Stability | experimental |
---|---|

Maintainer | conal@conal.net, andygill@ku.edu |

Groups: zero, addition, and negation (additive inverse)

- class AdditiveGroup v where
- (^-^) :: AdditiveGroup v => v -> v -> v
- sumV :: AdditiveGroup v => [v] -> v
- data Sum a

# Documentation

class AdditiveGroup v whereSource

Additive group `v`

.

The zero element: identity for '(^+^)'

Add vectors

Additive inverse

AdditiveGroup Double | |

AdditiveGroup Float | |

AdditiveGroup () | |

(RealFloat v, AdditiveGroup v) => AdditiveGroup (Complex v) | |

AdditiveGroup v => AdditiveGroup (a -> v) | |

(AdditiveGroup u, AdditiveGroup v) => AdditiveGroup (u, v) | |

(HasTrie u, AdditiveGroup v) => AdditiveGroup (:->: u v) | |

(HasBasis a, HasTrie (Basis a), VectorSpace u) => AdditiveGroup (:> a u) | |

(AdditiveGroup u, AdditiveGroup v, AdditiveGroup w) => AdditiveGroup (u, v, w) |

(^-^) :: AdditiveGroup v => v -> v -> vSource

Group subtraction

sumV :: AdditiveGroup v => [v] -> vSource

Sum over several vectors

Monoid under group addition. Alternative to the `Sum`

in
Data.Monoid, which uses `Num`

instead of `AdditiveGroup`

.