algebra.ring.Semiring
See theSemiring companion object
Semiring consists of:
- a commutative monoid for addition (+)
- a semigroup for multiplication (*)
Alternately, a Semiring can be thought of as a ring without a multiplicative identity or an additive inverse.
A Semiring with an additive inverse (-) is a Rng. A Semiring with a multiplicative identity (1) is a Rig. A Semiring with both of those is a Ring.
Attributes
- Companion:
- object
- Source:
- Semiring.scala
- Graph
- Supertypes
- trait MultiplicativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Any
- Known subtypes
- class SetSemiring[A]trait CommutativeSemiring[A]trait CommutativeRig[A]class BooleanAlgebratrait CommutativeRing[A]class ByteAlgebraclass IntAlgebraclass LongAlgebraclass ShortAlgebraclass UnitAlgebratrait BoolRing[A]class BoolRingFromBool[A]trait GCDRing[A]trait EuclideanRing[A]class BigIntAlgebraclass BigIntTruncatedDivisontrait Field[A]class BigDecimalAlgebraclass DoubleAlgebraclass FloatAlgebratrait forCommutativeRing[A]trait CommutativeSemifield[A]trait CommutativeRng[A]trait BoolRng[A]class SetBoolRng[A]class BoolRngFromGenBool[A]trait Rig[A]trait Ring[A]trait DivisionRing[A]trait Semifield[A]trait Rng[A]