https://github.com/abhiroop/provenance
Bottom up dynamic programming in Haskell
https://github.com/abhiroop/provenance
dynamic-programming haskell
Last synced: 11 months ago
JSON representation
Bottom up dynamic programming in Haskell
- Host: GitHub
- URL: https://github.com/abhiroop/provenance
- Owner: Abhiroop
- License: bsd-3-clause
- Created: 2018-02-07T13:37:16.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-10T17:12:21.000Z (almost 8 years ago)
- Last Synced: 2025-01-24T18:46:21.594Z (about 1 year ago)
- Topics: dynamic-programming, haskell
- Language: Haskell
- Size: 6.84 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# provenance
A dynamic programming helper library. It provides some simple APIs to mutable 2 dimensional arrays using `Data.Vector.Mutable` from the `vector` package.
This is essential for **BOTTOM UP** dynamic programming. It is fairly well documented to use laziness and other fancy tricks for memoized top-down dynamic programming in Haskell.
```haskell
make_matrix :: a -> Int -> Int -> m (MVector (MVector a))
read_matrix :: MVector (MVector a) -> Int -> Int -> m a
write_matrix :: MVector (MVector a) -> Int -> Int -> a -> m ()
m can be either IO or ST depending on your use case.
```
Taken from here : http://www.seas.upenn.edu/~cis552/current/lectures/soln/STMonad.html
The library also contains solutions to various dynamic programming problems in a bottom up style.