plankton-0.0.0.1: The core of a numeric prelude, taken from numhask

Safe HaskellNone
LanguageHaskell2010

Plankton.Basis

Description

Element-by-element operation for Representables

Synopsis

Documentation

class (Representable m, Additive a) => AdditiveBasis m a where Source #

element by element addition

(a .+. b) .+. c == a .+. (b .+. c)
zero .+. a = a
a .+. zero = a
a .+. b == b .+. a

Methods

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

Instances

(Representable r, Additive a) => AdditiveBasis r a Source # 

Methods

(.+.) :: r a -> r a -> r a Source #

class (Representable m, AdditiveGroup a) => AdditiveGroupBasis m a where Source #

element by element subtraction

a .-. a = singleton zero

Methods

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

Instances

(Representable r, AdditiveGroup a) => AdditiveGroupBasis r a Source # 

Methods

(.-.) :: r a -> r a -> r a Source #

class (Representable m, Multiplicative a) => MultiplicativeBasis m a where Source #

element by element multiplication

(a .*. b) .*. c == a .*. (b .*. c)
singleton one .*. a = a
a .*. singelton one = a
a .*. b == b .*. a

Methods

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

Instances

(Representable r, Multiplicative a) => MultiplicativeBasis r a Source # 

Methods

(.*.) :: r a -> r a -> r a Source #

class (Representable m, MultiplicativeGroup a) => MultiplicativeGroupBasis m a where Source #

element by element division

a ./. a == singleton one

Methods

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

Instances

(Representable r, MultiplicativeGroup a) => MultiplicativeGroupBasis r a Source # 

Methods

(./.) :: r a -> r a -> r a Source #