HLearn-algebra-1.0.1: Algebraic foundation for homomorphic learning

HLearn.Algebra.Structures.Modules

Description

Modules are a generalization of vector spaces

Synopsis

# Documentation

class Num (Ring m) => HasRing m Source

Associated Types

type Ring m Source

Instances

 HasRing x => HasRing (HList (: * x ([] *))) HasRing x => HasRing (HList (: * x xs)) Num r => HasRing (L2 [r]) Num r => HasRing (FreeModule r a) HasRing model => HasRing (Bagging' n seed model) HasRing (container model) => HasRing (FreeHomTrainer' k container model)

class (HasRing m, Abelian m, Group m) => Module m whereSource

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.

Methods

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

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

Instances

 Module x => Module (HList (: * x ([] *))) (Module x, Module (HList xs), ~ * (Ring (HList xs)) (Ring x)) => Module (HList (: * x xs)) Num r => Module (L2 [r]) (Num r, Ord a) => Module (FreeModule r a) (Module model, SingI Nat n) => Module (Bagging' n seed model) Module (container model) => Module (FreeHomTrainer' k container model)

class (Module m, Fractional (Ring m)) => VectorSpace m whereSource

Methods

(/.) :: m -> Ring m -> mSource

Instances

 (Module m, Fractional (Ring m)) => VectorSpace m