BoolRng

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.

Companion:
object
class SetBoolRng[A]
trait BoolRing[A]

Value members

Concrete methods

final override def negate(x: A): A
Definition Classes

Inherited methods

def isZero(a: A)(implicit ev: Eq[A]): Boolean

Tests if a is zero.

Tests if a is zero.

Inherited from:
AdditiveMonoid
def minus(x: A, y: A): A
Inherited from:
AdditiveGroup
def plus(x: A, y: A): A
Inherited from:
AdditiveSemigroup
def pow(a: A, n: Int): A
@nowarn("msg=deprecated")
def sum(as: IterableOnce[A]): A

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Inherited from:
AdditiveMonoid
override def sumN(a: A, n: Int): A
Definition Classes
Inherited from:
AdditiveGroup
def times(x: A, y: A): A
@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
@nowarn("msg=deprecated")
override def trySum(as: IterableOnce[A]): Option[A]
Definition Classes
Inherited from:
AdditiveMonoid
def zero: A
Inherited from:
AdditiveMonoid