numeric-prelude-0.4.4: An experimental alternative hierarchy of numeric type classes
Safe HaskellNone
LanguageHaskell98

MathObj.DiscreteMap

Description

DiscreteMap was originally intended as a type class that unifies Map and Array. One should be able to simply choose between - Map for sparse arrays - Array for full arrays.

However, the Edison package provides the class AssocX which already exists for that purpose.

Currently I use this module for some numeric instances of Data.Map.

Synopsis

Documentation

strip :: (Ord i, Eq v, C v) => Map i v -> Map i v Source #

Remove all zero values from the map.

Orphan instances

(Ord i, Eq a, Eq v, C a v) => C a (Map i v) Source # 
Instance details

Methods

(*>) :: a -> Map i v -> Map i v Source #

(Ord i, Eq a, Eq v, C a v) => C a (Map i v) Source # 
Instance details

(Ord i, Eq a, Eq v, C a v) => C a (Map i v) Source # 
Instance details

Methods

norm :: Map i v -> a Source #

(Ord i, Eq a, Eq v, C a v) => C a (Map i v) Source # 
Instance details

Methods

norm :: Map i v -> a Source #

(Ord i, Eq a, Eq v, C a, Sqr a v) => C a (Map i v) Source # 
Instance details

Methods

norm :: Map i v -> a Source #

(Ord i, Eq a, Eq v, Sqr a v) => Sqr a (Map i v) Source # 
Instance details

Methods

normSqr :: Map i v -> a Source #

Ord i => C (Map i) Source # 
Instance details

Methods

zero :: C a => Map i a Source #

(<+>) :: C a => Map i a -> Map i a -> Map i a Source #

(*>) :: C a => a -> Map i a -> Map i a Source #

(Ord i, Eq v, C v) => C (Map i v) Source # 
Instance details

Methods

zero :: Map i v Source #

(+) :: Map i v -> Map i v -> Map i v Source #

(-) :: Map i v -> Map i v -> Map i v Source #

negate :: Map i v -> Map i v Source #