Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Algebra for Modules
Synopsis
- class Additive a => AdditiveAction m a | m -> a where
- (.+) :: a -> m -> m
- (+.) :: AdditiveAction m a => m -> a -> m
- class Subtractive a => SubtractiveAction m a | m -> a where
- (.-) :: a -> m -> m
- (-.) :: (AdditiveAction m a, Subtractive a) => m -> a -> m
- class Multiplicative a => MultiplicativeAction m a | m -> a where
- (.*) :: a -> m -> m
- (*.) :: MultiplicativeAction m a => m -> a -> m
- class Divisive a => DivisiveAction m a | m -> a where
- (./) :: a -> m -> m
- (/.) :: (MultiplicativeAction m a, Divisive a) => m -> a -> m
- class (Distributive a, MultiplicativeAction m a) => Module m a
Documentation
class Additive a => AdditiveAction m a | m -> a where Source #
Additive Action
(+.) :: AdditiveAction m a => m -> a -> m infixl 6 Source #
flipped additive action
(+.) == flip (.+)
class Subtractive a => SubtractiveAction m a | m -> a where Source #
Subtractive Action
(-.) :: (AdditiveAction m a, Subtractive a) => m -> a -> m infixl 6 Source #
right scalar subtraction
(-.) == (+.) . negate
class Multiplicative a => MultiplicativeAction m a | m -> a where Source #
Multiplicative Action
(*.) :: MultiplicativeAction m a => m -> a -> m infixl 7 Source #
flipped multiplicative action
(*.) == flip (.*)
class Divisive a => DivisiveAction m a | m -> a where Source #
Divisive Action
(/.) :: (MultiplicativeAction m a, Divisive a) => m -> a -> m Source #
right scalar division
(/.) == (*.) . recip
class (Distributive a, MultiplicativeAction m a) => Module m a Source #
A Module
a .* one == a (a + b) .* c == (a .* c) + (b .* c) c *. (a + b) == (c *. a) + (c *. b) a .* zero == zero a .* b == b *. a