HLearn-algebra-0.1.0: Algebraic foundation for homomorphic learning

HLearn.Algebra.Structures.Modules

Description

Modules are a generalization of vector spaces

Synopsis

# Documentation

class (LeftOperator r m, RightOperator r m) => Operator r m Source

Instances

 (LeftOperator r m, RightOperator r m) => Operator r m

class LeftOperator r m | m -> r whereSource

Methods

(.*) :: r -> m -> mSource

Instances

 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

Methods

(*.) :: m -> r -> mSource

Instances

 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.

Instances

 (LeftModule r g, RightModule r g) => Module r g

class (LeftOperator r g, Num r, Group g, Abelian g) => LeftModule r g Source

Instances

 (LeftOperator r g, Num r, Group g, Abelian g) => LeftModule r g (LeftOperator r (FreeMod r a), Group (FreeMod r a), Abelian (FreeMod r a), Num r, Ord a) => LeftModule r (FreeMod r a)

class (RightOperator r g, Num r, Group g, Abelian g) => RightModule r g Source

Instances

 (RightOperator r g, Num r, Group g, Abelian g) => RightModule r g (RightOperator r (FreeMod r a), Group (FreeMod r a), Abelian (FreeMod r a), Num r, Ord a) => RightModule r (FreeMod r a)

Constructors

 FreeModParams

newtype (Num r, Ord a) => FreeMod r a Source

Constructors

 FreeMod (Map a r)

Instances

 (RightOperator r (FreeMod r a), Group (FreeMod r a), Abelian (FreeMod r a), Num r, Ord a) => RightModule r (FreeMod r a) (LeftOperator r (FreeMod r a), Group (FreeMod r a), Abelian (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) (Semigroup (FreeMod r a), Num r, Ord a) => RegularSemigroup (FreeMod r a) (Semigroup (FreeMod r a), Num r, Ord a) => Abelian (FreeMod r a)

list2module :: (Num r, Ord r, Ord a) => [a] -> FreeMod r aSource