A Boolean rng is a rng whose multiplication is idempotent, that is
a⋅a = a
for all elements ''a''. This property also implies a+a = 0
for all ''a'', and a⋅b = b⋅a
(commutativity of multiplication).
Every BoolRng
is equivalent to algebra.lattice.GenBool
.
See algebra.lattice.GenBoolFromBoolRng
for details.
- Companion:
- object
trait CommutativeRng[A]
trait CommutativeSemiring[A]
trait MultiplicativeCommutativeSemigroup[A]
trait Rng[A]
trait AdditiveCommutativeGroup[A]
trait AdditiveGroup[A]
trait Semiring[A]
trait MultiplicativeSemigroup[A]
trait AdditiveCommutativeMonoid[A]
trait AdditiveCommutativeSemigroup[A]
trait AdditiveMonoid[A]
trait AdditiveSemigroup[A]
trait Serializable
class Any
BoolRng[A]
Value members
Concrete methods
Inherited methods
@nowarn("msg=deprecated")
Given a sequence of as
, compute the sum.
Given a sequence of as
, compute the sum.
- Inherited from:
- AdditiveMonoid
@nowarn("msg=deprecated")
Given a sequence of as
, combine them and return the total.
Given a sequence of as
, combine them and return the total.
If the sequence is empty, returns None. Otherwise, returns Some(total).
- Inherited from:
- MultiplicativeSemigroup