vector-space-0.16: Vector & affine spaces, linear maps, and derivatives
Copyright (c) Conal Elliott and Andy J Gill 2008
License BSD3
Maintainer conal@conal.net, andygill@ku.edu
Stability experimental
Safe Haskell Safe-Inferred
Language Haskell98

Data.AdditiveGroup

Description

Synopsis

Documentation

class AdditiveGroup v where Source #

Additive group v .

Minimal complete definition

Nothing

Methods

zeroV :: v Source #

The zero element: identity for (^+^)

(^+^) :: v -> v -> v infixl 6 Source #

Add vectors

default (^+^) :: ( Generic v, AdditiveGroup (VRep v)) => v -> v -> v Source #

negateV :: v -> v Source #

Additive inverse

default negateV :: ( Generic v, AdditiveGroup (VRep v)) => v -> v Source #

(^-^) :: v -> v -> v infixl 6 Source #

Group subtraction

Instances

Instances details
AdditiveGroup Double Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup Float Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup Int Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup Integer Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup () Source #
Instance details

Defined in Data.AdditiveGroup

Methods

zeroV :: () Source #

(^+^) :: () -> () -> () Source #

negateV :: () -> () Source #

(^-^) :: () -> () -> () Source #

AdditiveGroup CSChar Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup CShort Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup CInt Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup CLong Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup CLLong Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup CFloat Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup CDouble Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup CIntMax Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup a => AdditiveGroup ( Maybe a) Source #
Instance details

Defined in Data.AdditiveGroup

Integral a => AdditiveGroup ( Ratio a) Source #
Instance details

Defined in Data.AdditiveGroup

( RealFloat v, AdditiveGroup v) => AdditiveGroup ( Complex v) Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup a => AdditiveGroup ( Sum a) Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup v => AdditiveGroup (a -> v) Source #
Instance details

Defined in Data.AdditiveGroup

Methods

zeroV :: a -> v Source #

(^+^) :: (a -> v) -> (a -> v) -> a -> v Source #

negateV :: (a -> v) -> a -> v Source #

(^-^) :: (a -> v) -> (a -> v) -> a -> v Source #

( AdditiveGroup u, AdditiveGroup v) => AdditiveGroup (u, v) Source #
Instance details

Defined in Data.AdditiveGroup

Methods

zeroV :: (u, v) Source #

(^+^) :: (u, v) -> (u, v) -> (u, v) Source #

negateV :: (u, v) -> (u, v) Source #

(^-^) :: (u, v) -> (u, v) -> (u, v) Source #

( HasTrie u, AdditiveGroup v) => AdditiveGroup (u :->: v) Source #
Instance details

Defined in Data.AdditiveGroup

( HasTrie ( Basis u), AdditiveGroup v) => AdditiveGroup (u :-* v) Source #
Instance details

Defined in Data.LinearMap

( HasBasis a, HasTrie ( Basis a), AdditiveGroup u) => AdditiveGroup (a :> u) Source #
Instance details

Defined in Data.Maclaurin

AdditiveGroup a => AdditiveGroup ( Rec0 a s) Source #
Instance details

Defined in Data.AdditiveGroup

( AdditiveGroup u, AdditiveGroup v, AdditiveGroup w) => AdditiveGroup (u, v, w) Source #
Instance details

Defined in Data.AdditiveGroup

Methods

zeroV :: (u, v, w) Source #

(^+^) :: (u, v, w) -> (u, v, w) -> (u, v, w) Source #

negateV :: (u, v, w) -> (u, v, w) Source #

(^-^) :: (u, v, w) -> (u, v, w) -> (u, v, w) Source #

( AdditiveGroup (f p), AdditiveGroup (g p)) => AdditiveGroup ((f :*: g) p) Source #
Instance details

Defined in Data.AdditiveGroup

Methods

zeroV :: (f :*: g) p Source #

(^+^) :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

negateV :: (f :*: g) p -> (f :*: g) p Source #

(^-^) :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

( AdditiveGroup u, AdditiveGroup v, AdditiveGroup w, AdditiveGroup x) => AdditiveGroup (u, v, w, x) Source #
Instance details

Defined in Data.AdditiveGroup

Methods

zeroV :: (u, v, w, x) Source #

(^+^) :: (u, v, w, x) -> (u, v, w, x) -> (u, v, w, x) Source #

negateV :: (u, v, w, x) -> (u, v, w, x) Source #

(^-^) :: (u, v, w, x) -> (u, v, w, x) -> (u, v, w, x) Source #

AdditiveGroup (f p) => AdditiveGroup ( M1 i c f p) Source #
Instance details

Defined in Data.AdditiveGroup

Methods

zeroV :: M1 i c f p Source #

(^+^) :: M1 i c f p -> M1 i c f p -> M1 i c f p Source #

negateV :: M1 i c f p -> M1 i c f p Source #

(^-^) :: M1 i c f p -> M1 i c f p -> M1 i c f p Source #

sumV :: ( Foldable f, AdditiveGroup v) => f v -> v Source #

Sum over several vectors

newtype Sum a Source #

Monoid under group addition. Alternative to the Sum in Data.Monoid , which uses Num instead of AdditiveGroup .

Constructors

Sum

Fields

Instances

Instances details
Functor Sum Source #
Instance details

Defined in Data.AdditiveGroup

Methods

fmap :: (a -> b) -> Sum a -> Sum b Source #

(<$) :: a -> Sum b -> Sum a Source #

Applicative Sum Source #
Instance details

Defined in Data.AdditiveGroup

Bounded a => Bounded ( Sum a) Source #
Instance details

Defined in Data.AdditiveGroup

Eq a => Eq ( Sum a) Source #
Instance details

Defined in Data.AdditiveGroup

Ord a => Ord ( Sum a) Source #
Instance details

Defined in Data.AdditiveGroup

Read a => Read ( Sum a) Source #
Instance details

Defined in Data.AdditiveGroup

Show a => Show ( Sum a) Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup a => Semigroup ( Sum a) Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup a => Monoid ( Sum a) Source #
Instance details

Defined in Data.AdditiveGroup

AdditiveGroup a => AdditiveGroup ( Sum a) Source #
Instance details

Defined in Data.AdditiveGroup

inSum :: (a -> b) -> Sum a -> Sum b Source #

Application a unary function inside a Sum

inSum2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c Source #

Application a binary function inside a Sum