Skip to content

Abhiroop/provenance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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.

About

Bottom up dynamic programming in Haskell

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published