numhask-0.10.1.1: A numeric class hierarchy.
Safe HaskellSafe-Inferred
LanguageHaskell2010

NumHask.Algebra.Module

Description

Algebra for Modules

Synopsis

Documentation

class Additive a => AdditiveAction m a | m -> a where Source #

Additive Action

Methods

(.+) :: a -> m -> m infixl 6 Source #

(+.) :: 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

Methods

(.-) :: a -> m -> m infixl 6 Source #

(-.) :: (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

Methods

(.*) :: a -> m -> m infixl 7 Source #

(*.) :: 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

Methods

(./) :: a -> m -> m infixl 7 Source #

(/.) :: (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