array-memoize: Memoization combinators for finite subsets of function domains using arrays
Memoization combinators are great for providing high-performance Haskell programs, but they can be even faster if memoization is performed on a finite, discrete domain as an array can then be used.
This package provides various combinators for doing just this, including also combinators for quanitzing and discretizing Float/Double-valued functions.
Example:
fibA :: Int -> Int fibA 0 = 1 fibA 1 = 1 fibA n = fibB (n - 1) + fibB (n - 2) fibB = arrayMemo (0, 1000) fibA
Downloads
- array-memoize-0.5.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.5.0, 0.6.0 |
---|---|
Dependencies | array (>=0.4), base (<5) [details] |
Tested with | ghc >=7.6 |
License | BSD-3-Clause |
Copyright | Dominic Orchard, 2014 |
Author | Dominic Orchard |
Maintainer | Dominic Orchard |
Category | Syntax |
Source repo | head: git clone https://github.com/dorchard/array-memoize |
Uploaded | by DominicOrchard at 2014-03-31T11:46:20Z |
Distributions | LTSHaskell:0.6.0, NixOS:0.6.0, Stackage:0.6.0 |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Downloads | 3088 total (2 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Successful builds reported [all 1 reports] |