vector-space operations for finite maps using Data.Map
Haskell
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/Data/Map
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
Setup.hs
doctests.hs
stack.yaml
vector-space-map.cabal

README.md

vector-space-map

Build Status

vector-space operations for finite maps using Data.Map

Data.Map.Vector provides MapVector, a wrapper around Map from containers which supports constant maps, i.e. maps containing only one value. This allows an identity under intersection and an Applicative instance. It also has instances of AdditiveGroup, VectorSpace, InnerSpace, and Num with appropriate value types. Provides operations for addition, subtraction, element-wise operations (through Applicative), scalar multiplication (through VectorSpace), and dot product.

Also consider Conal Elliott's total-map package, which provides a different Applicative map.