Safe Haskell | None |
---|
Agda.Termination.Semiring
Description
Semirings.
- class Eq a => HasZero a where
- zeroElement :: a
- class (Eq a, Monoid a) => SemiRing a where
- multiply :: a -> a -> a
- data Semiring a = Semiring {}
- semiringInvariant :: (Arbitrary a, Eq a, Show a) => Semiring a -> a -> a -> a -> Bool
- integerSemiring :: Semiring Integer
- boolSemiring :: Semiring Bool
- tests :: IO Bool
Documentation
HasZero
is needed for sparse matrices, to tell which is the element
that does not have to be stored.
It is a cut-down version of SemiRing
which is definable
without the implicit ?cutoff
.
Methods
zeroElement :: a
class (Eq a, Monoid a) => SemiRing a where
SemiRing type class. Additive monoid with multiplication operation. Inherit addition and zero from Monoid.
Methods
multiply :: a -> a -> a
data Semiring a
Semirings.
semiringInvariant :: (Arbitrary a, Eq a, Show a) => Semiring a -> a -> a -> a -> Bool
Semiring invariant.
The standard semiring on Bool
s.