Safe Haskell | None |
---|
Modules are a generalization of vector spaces
- class (LeftOperator r m, RightOperator r m) => Operator r m
- class LeftOperator r m | m -> r where
- (.*) :: r -> m -> m
- class RightOperator r m | m -> r where
- (*.) :: m -> r -> m
- class (LeftModule r g, RightModule r g) => Module r g
- class (LeftOperator r g, Num r, Group g, Abelian g) => LeftModule r g
- class (RightOperator r g, Num r, Group g, Abelian g) => RightModule r g
- data FreeModParams = FreeModParams
- newtype (Num r, Ord a) => FreeMod r a = FreeMod (Map a r)
- list2module :: (Num r, Ord r, Ord a) => [a] -> FreeMod r a
Documentation
class (LeftOperator r m, RightOperator r m) => Operator r m Source
(LeftOperator r m, RightOperator r m) => Operator r m |
class LeftOperator r m | m -> r whereSource
LeftOperator Double Double | |
LeftOperator Float Float | |
LeftOperator Int Int | |
LeftOperator Integer Integer | |
LeftOperator a b => LeftOperator a [b] | |
(LeftOperator r sg, RegularSemigroup sg) => LeftOperator r (RegSG2Group sg) | |
(Num r, Ord a) => LeftOperator r (FreeMod r a) |
class RightOperator r m | m -> r whereSource
RightOperator Double Double | |
RightOperator Float Float | |
RightOperator Int Int | |
RightOperator Integer Integer | |
RightOperator a b => RightOperator a [b] | |
(RightOperator r sg, RegularSemigroup sg) => RightOperator r (RegSG2Group sg) | |
(Num r, Ord a) => RightOperator r (FreeMod r a) |
class (LeftModule r g, RightModule r g) => Module r g Source
Bug: Technically, the free operator should just require that r be a semigroup and use () to chain the r's together. But this would make things awkward because the number types aren't instances of semigroup. Constraining r to be of type Num reduces our generality but makes FreeOp easier to work with in most practical use cases.
Bug: The module classes have the constraint that r be of type Num. Technically, this should be a Ring. But creating a Ring class would be awkward because it would conflict with the Num class and require importing a different Prelude.
(LeftModule r g, RightModule r g) => Module r g |
class (LeftOperator r g, Num r, Group g, Abelian g) => LeftModule r g Source
(LeftOperator r g, Num r, Group g, Abelian g) => LeftModule r g | |
(Num r, Ord a) => LeftModule r (FreeMod r a) |
class (RightOperator r g, Num r, Group g, Abelian g) => RightModule r g Source
(RightOperator r g, Num r, Group g, Abelian g) => RightModule r g | |
(Num r, Ord a) => RightModule r (FreeMod r a) |
newtype (Num r, Ord a) => FreeMod r a Source
(Num r, Ord a) => RightModule r (FreeMod r a) | |
(Num r, Ord a) => LeftModule r (FreeMod r a) | |
(Num r, Ord a) => RightOperator r (FreeMod r a) | |
(Num r, Ord a) => LeftOperator r (FreeMod r a) | |
Foldable (FreeMod r) | |
Functor (FreeMod r) | |
(Eq r, Eq a) => Eq (FreeMod r a) | |
(Num r, Ord a, Read r, Read a) => Read (FreeMod r a) | |
(Num r, Ord a, Show r, Show a) => Show (FreeMod r a) | |
(Num r, Ord a) => Monoid (FreeMod r a) | |
(Num r, Ord a) => Semigroup (FreeMod r a) | |
(Num r, Ord a) => RegularSemigroup (FreeMod r a) | |
(Num r, Ord a) => Abelian (FreeMod r a) |