trait BoolRng[A] extends CommutativeRng[A]
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.
- Self Type
- BoolRng[A]
- Alphabetic
- By Inheritance
- BoolRng
- CommutativeRng
- CommutativeSemiring
- MultiplicativeCommutativeSemigroup
- Rng
- AdditiveCommutativeGroup
- AdditiveGroup
- Semiring
- MultiplicativeSemigroup
- AdditiveCommutativeMonoid
- AdditiveCommutativeSemigroup
- AdditiveMonoid
- AdditiveSemigroup
- Serializable
- Serializable
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
getClass(): Class[_]
- Definition Classes
- Any
-
abstract
def
plus(x: A, y: A): A
- Definition Classes
- AdditiveSemigroup
-
abstract
def
times(x: A, y: A): A
- Definition Classes
- MultiplicativeSemigroup
-
abstract
def
zero: A
- Definition Classes
- AdditiveMonoid
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
def
additive: CommutativeGroup[A]
- Definition Classes
- AdditiveCommutativeGroup → AdditiveCommutativeMonoid → AdditiveCommutativeSemigroup → AdditiveGroup → AdditiveMonoid → AdditiveSemigroup
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
equals(arg0: Any): Boolean
- Definition Classes
- Any
-
def
hashCode(): Int
- Definition Classes
- Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isZero(a: A)(implicit ev: Eq[A]): Boolean
Tests if
a
is zero.Tests if
a
is zero.- Definition Classes
- AdditiveMonoid
-
def
minus(x: A, y: A): A
- Definition Classes
- AdditiveGroup
-
def
multiplicative: CommutativeSemigroup[A]
- Definition Classes
- MultiplicativeCommutativeSemigroup → MultiplicativeSemigroup
-
final
def
negate(x: A): A
- Definition Classes
- BoolRng → AdditiveGroup
-
def
positivePow(a: A, n: Int): A
- Attributes
- protected[this]
- Definition Classes
- MultiplicativeSemigroup
-
def
positiveSumN(a: A, n: Int): A
- Attributes
- protected[this]
- Definition Classes
- AdditiveSemigroup
-
def
pow(a: A, n: Int): A
- Definition Classes
- MultiplicativeSemigroup
-
def
sum(as: TraversableOnce[A]): A
Given a sequence of
as
, compute the sum.Given a sequence of
as
, compute the sum.- Definition Classes
- AdditiveMonoid
-
def
sumN(a: A, n: Int): A
- Definition Classes
- AdditiveGroup → AdditiveMonoid → AdditiveSemigroup
-
def
toString(): String
- Definition Classes
- Any
-
def
tryProduct(as: TraversableOnce[A]): Option[A]
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).
- Definition Classes
- MultiplicativeSemigroup
-
def
trySum(as: TraversableOnce[A]): Option[A]
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).
- Definition Classes
- AdditiveMonoid → AdditiveSemigroup