Safe Haskell | None |
---|---|
Language | Haskell2010 |
Semirings.
Synopsis
- class Eq a => HasZero a where
- zeroElement :: a
- data Semiring a = Semiring {}
- integerSemiring :: Semiring Integer
- intSemiring :: Semiring Int
- boolSemiring :: Semiring Bool
Documentation
class Eq a => HasZero a where Source #
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
.
zeroElement :: a Source #
Instances
HasZero Order Source # | |
Defined in Agda.Termination.Order zeroElement :: Order Source # | |
HasZero Integer Source # | The standard semiring on |
Defined in Agda.Termination.Semiring zeroElement :: Integer Source # | |
HasZero Int Source # | The standard semiring on |
Defined in Agda.Termination.Semiring zeroElement :: Int Source # |
Semirings.
integerSemiring :: Semiring Integer Source #
intSemiring :: Semiring Int Source #
boolSemiring :: Semiring Bool Source #
The standard semiring on Bool
s.