| Safe Haskell | Safe |
|---|---|
| Language | Haskell98 |
Numeric.Algebra.Class
Contents
Synopsis
- class Multiplicative r where
- pow1pIntegral :: (Integral r, Integral n) => r -> n -> r
- product1 :: (Foldable1 f, Multiplicative r) => f r -> r
- class (Additive r, Abelian r, Multiplicative r) => Semiring r
- class (Semiring r, Additive m) => LeftModule r m where
- class (Semiring r, Additive m) => RightModule r m where
- class (LeftModule r m, RightModule r m) => Module r m
- class (LeftModule Natural m, RightModule Natural m) => Monoidal m where
- sum :: (Foldable f, Monoidal m) => f m -> m
- sinnumIdempotent :: (Integral n, Idempotent r, Monoidal r) => n -> r -> r
- class Semiring r => Algebra r a where
- class Semiring r => Coalgebra r c where
Multiplicative Semigroups
class Multiplicative r where #
A multiplicative semigroup
Minimal complete definition
Instances
pow1pIntegral :: (Integral r, Integral n) => r -> n -> r #
product1 :: (Foldable1 f, Multiplicative r) => f r -> r #
Semirings
class (Additive r, Abelian r, Multiplicative r) => Semiring r #
A pair of an additive abelian semigroup, and a multiplicative semigroup, with the distributive laws:
a(b + c) = ab + ac -- left distribution (we are a LeftNearSemiring) (a + b)c = ac + bc -- right distribution (we are a [Right]NearSemiring)
Common notation includes the laws for additive and multiplicative identity in semiring.
If you want that, look at Rig instead.
Ideally we'd use the cyclic definition:
class (LeftModule r r, RightModule r r, Additive r, Abelian r, Multiplicative r) => Semiring r
to enforce that every semiring r is an r-module over itself, but Haskell doesn't like that.
Instances
Left and Right Modules
class (Semiring r, Additive m) => LeftModule r m where #
Minimal complete definition
Instances
class (Semiring r, Additive m) => RightModule r m where #
Minimal complete definition
Instances
class (LeftModule r m, RightModule r m) => Module r m #
Instances
| (LeftModule r m, RightModule r m) => Module r m # | |
Defined in Numeric.Algebra.Class | |
Additive Monoids
class (LeftModule Natural m, RightModule Natural m) => Monoidal m where #
An additive monoid
zero + a = a = a + zero
Minimal complete definition
Instances
sinnumIdempotent :: (Integral n, Idempotent r, Monoidal r) => n -> r -> r #
Associative algebras
class Semiring r => Algebra r a where #
An associative algebra built with a free module over a semiring
Minimal complete definition
Instances
Coassociative coalgebras
class Semiring r => Coalgebra r c where #
Minimal complete definition
Instances
| Semiring r => Coalgebra r IntSet # | the free commutative band coalgebra over Int |
| Semiring r => Coalgebra r () # | |
Defined in Numeric.Algebra.Class | |
| (Commutative k, Rng k) => Coalgebra k TrigBasis # | |
| (TriviallyInvolutive r, Rng r) => Coalgebra r QuaternionBasis' # | dual quaternion comultiplication |
Defined in Numeric.Coalgebra.Quaternion Methods comult :: (QuaternionBasis' -> r) -> QuaternionBasis' -> QuaternionBasis' -> r # | |
| (Commutative k, Semiring k) => Coalgebra k HyperBasis # | the hyperbolic trigonometric coalgebra |
Defined in Numeric.Coalgebra.Hyperbolic Methods comult :: (HyperBasis -> k) -> HyperBasis -> HyperBasis -> k # | |
| Rng k => Coalgebra k DualBasis' # | |
Defined in Numeric.Coalgebra.Dual Methods comult :: (DualBasis' -> k) -> DualBasis' -> DualBasis' -> k # | |
| (TriviallyInvolutive r, Rng r) => Coalgebra r QuaternionBasis # | the trivial diagonal coalgebra |
Defined in Numeric.Algebra.Quaternion Methods comult :: (QuaternionBasis -> r) -> QuaternionBasis -> QuaternionBasis -> r # | |
| (Commutative k, Monoidal k, Semiring k) => Coalgebra k HyperBasis' # | |
Defined in Numeric.Algebra.Hyperbolic Methods comult :: (HyperBasis' -> k) -> HyperBasis' -> HyperBasis' -> k # | |
| Rng k => Coalgebra k DualBasis # | |
| Rng k => Coalgebra k ComplexBasis # | |
Defined in Numeric.Algebra.Complex Methods comult :: (ComplexBasis -> k) -> ComplexBasis -> ComplexBasis -> k # | |
| (Semiring r, Additive b) => Coalgebra r (IntMap b) # | the free commutative coalgebra over a set and Int |
| (Semiring r, Ord a) => Coalgebra r (Set a) # | the free commutative band coalgebra |
| Semiring r => Coalgebra r (Seq a) # | The tensor Hopf algebra |
| Semiring r => Coalgebra r [a] # | The tensor Hopf algebra |
Defined in Numeric.Algebra.Class | |
| (Commutative r, Monoidal r, Semiring r, PartialSemigroup a) => Coalgebra r (Morphism a) # | |
| (Eq a, Commutative r, Monoidal r, Semiring r) => Coalgebra r (Interval' a) # | |
| Eigenmetric r m => Coalgebra r (BasisCoblade m) # | |
Defined in Numeric.Coalgebra.Geometric Methods comult :: (BasisCoblade m -> r) -> BasisCoblade m -> BasisCoblade m -> r # | |
| (Semiring r, Ord a, Additive b) => Coalgebra r (Map a b) # | the free commutative coalgebra over a set and a given semigroup |
| (Coalgebra r a, Coalgebra r b) => Coalgebra r (a, b) # | |
Defined in Numeric.Algebra.Class | |
| Algebra r m => Coalgebra r (m -> r) # | Every coalgebra gives rise to an algebra by vector space duality classically. Sadly, it requires vector space duality, which we cannot use constructively. The dual argument only relies in the fact that any constructive coalgebra can only inspect a finite number of coefficients, which we CAN exploit. |
Defined in Numeric.Algebra.Class | |
| (Coalgebra r a, Coalgebra r b, Coalgebra r c) => Coalgebra r (a, b, c) # | |
Defined in Numeric.Algebra.Class | |
| (Coalgebra r a, Coalgebra r b, Coalgebra r c, Coalgebra r d) => Coalgebra r (a, b, c, d) # | |
Defined in Numeric.Algebra.Class | |
| (Coalgebra r a, Coalgebra r b, Coalgebra r c, Coalgebra r d, Coalgebra r e) => Coalgebra r (a, b, c, d, e) # | |
Defined in Numeric.Algebra.Class | |