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

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

Safe Haskell | Safe-Infered |

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

# Documentation

class AdditiveGroup v whereSource

Additive group `v`

.

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

Add vectors

Additive inverse

AdditiveGroup Double | |

AdditiveGroup Float | |

AdditiveGroup Int | |

AdditiveGroup Integer | |

AdditiveGroup () | |

Integral a => AdditiveGroup (Ratio a) | |

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

AdditiveGroup a => AdditiveGroup (Maybe a) | |

AdditiveGroup a => AdditiveGroup (Sum a) | |

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

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

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

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

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

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

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

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

Group subtraction

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

Sum over several vectors

Monoid under group addition. Alternative to the `Sum`

in
Data.Monoid, which uses `Num`

instead of `AdditiveGroup`

.