class BooleanAlgebra extends Bool[Boolean] with CommutativeRig[Boolean]
This commutative rig is different than the one obtained from GF(2).
It uses || for plus, and && for times.
- Source
- boolean.scala
- Alphabetic
- By Inheritance
- BooleanAlgebra
- CommutativeRig
- MultiplicativeCommutativeMonoid
- CommutativeSemiring
- MultiplicativeCommutativeSemigroup
- Rig
- MultiplicativeMonoid
- Semiring
- MultiplicativeSemigroup
- AdditiveCommutativeMonoid
- AdditiveCommutativeSemigroup
- AdditiveMonoid
- AdditiveSemigroup
- Bool
- GenBool
- Heyting
- BoundedDistributiveLattice
- DistributiveLattice
- BoundedLattice
- BoundedJoinSemilattice
- BoundedMeetSemilattice
- Lattice
- MeetSemilattice
- JoinSemilattice
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new BooleanAlgebra()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
additive: CommutativeMonoid[Boolean]
- Definition Classes
- AdditiveCommutativeMonoid → AdditiveCommutativeSemigroup → AdditiveMonoid → AdditiveSemigroup
-
def
and(x: Boolean, y: Boolean): Boolean
- Definition Classes
- BooleanAlgebra → GenBool → Heyting
-
def
asBoolRing: BoolRing[Boolean]
Every Boolean algebra is a BoolRing, with multiplication defined as
and
and addition defined asxor
.Every Boolean algebra is a BoolRing, with multiplication defined as
and
and addition defined asxor
. Bool does not extend BoolRing because, e.g. we might want a Bool[Int] and CommutativeRing[Int] to refer to different structures, by default.Note that the ring returned by this method is not an extension of the
Rig
returned fromBoundedDistributiveLattice.asCommutativeRig
. -
def
asCommutativeRig: CommutativeRig[Boolean]
Return a CommutativeRig using join and meet.
Return a CommutativeRig using join and meet. Note this must obey the commutative rig laws since meet(a, one) = a, and meet and join are associative, commutative and distributive.
- Definition Classes
- BoundedDistributiveLattice
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
complement(x: Boolean): Boolean
- Definition Classes
- BooleanAlgebra → Heyting
-
def
dual: Bool[Boolean]
This is the lattice with meet and join swapped
This is the lattice with meet and join swapped
- Definition Classes
- Bool → BoundedDistributiveLattice → BoundedLattice → Lattice
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def imp(a: Boolean, b: Boolean): Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isOne(x: Boolean)(implicit ev: Eq[Boolean]): Boolean
Tests if
a
is one.Tests if
a
is one.- Definition Classes
- BooleanAlgebra → MultiplicativeMonoid → BoundedMeetSemilattice
-
def
isZero(x: Boolean)(implicit ev: Eq[Boolean]): Boolean
Tests if
a
is zero.Tests if
a
is zero.- Definition Classes
- BooleanAlgebra → AdditiveMonoid → BoundedJoinSemilattice
-
def
join(a: Boolean, b: Boolean): Boolean
- Definition Classes
- GenBool → JoinSemilattice
-
def
joinPartialOrder(implicit ev: Eq[Boolean]): PartialOrder[Boolean]
- Definition Classes
- JoinSemilattice
-
def
joinSemilattice: BoundedSemilattice[Boolean]
- Definition Classes
- BoundedJoinSemilattice → JoinSemilattice
-
def
meet(a: Boolean, b: Boolean): Boolean
- Definition Classes
- GenBool → MeetSemilattice
-
def
meetPartialOrder(implicit ev: Eq[Boolean]): PartialOrder[Boolean]
- Definition Classes
- MeetSemilattice
-
def
meetSemilattice: BoundedSemilattice[Boolean]
- Definition Classes
- BoundedMeetSemilattice → MeetSemilattice
-
def
multiplicative: CommutativeMonoid[Boolean]
- Definition Classes
- MultiplicativeCommutativeMonoid → MultiplicativeCommutativeSemigroup → MultiplicativeMonoid → MultiplicativeSemigroup
-
def
nand(a: Boolean, b: Boolean): Boolean
- Definition Classes
- Heyting
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nor(a: Boolean, b: Boolean): Boolean
- Definition Classes
- Heyting
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
nxor(a: Boolean, b: Boolean): Boolean
- Definition Classes
- Heyting
-
def
one: Boolean
- Definition Classes
- BooleanAlgebra → MultiplicativeMonoid → BoundedMeetSemilattice
-
def
or(x: Boolean, y: Boolean): Boolean
- Definition Classes
- BooleanAlgebra → GenBool → Heyting
-
def
plus(a: Boolean, b: Boolean): Boolean
- Definition Classes
- BooleanAlgebra → AdditiveSemigroup
-
def
positivePow(a: Boolean, n: Int): Boolean
- Attributes
- protected[this]
- Definition Classes
- MultiplicativeSemigroup
-
def
positiveSumN(a: Boolean, n: Int): Boolean
- Attributes
- protected[this]
- Definition Classes
- AdditiveSemigroup
-
def
pow(a: Boolean, b: Int): Boolean
- Definition Classes
- BooleanAlgebra → MultiplicativeMonoid → MultiplicativeSemigroup
-
def
product(as: TraversableOnce[Boolean]): Boolean
Given a sequence of
as
, compute the product.Given a sequence of
as
, compute the product.- Definition Classes
- MultiplicativeMonoid
-
def
sum(as: TraversableOnce[Boolean]): Boolean
Given a sequence of
as
, compute the sum.Given a sequence of
as
, compute the sum.- Definition Classes
- AdditiveMonoid
-
def
sumN(a: Boolean, n: Int): Boolean
- Definition Classes
- AdditiveMonoid → AdditiveSemigroup
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
times(a: Boolean, b: Boolean): Boolean
- Definition Classes
- BooleanAlgebra → MultiplicativeSemigroup
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
tryProduct(as: TraversableOnce[Boolean]): Option[Boolean]
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
- MultiplicativeMonoid → MultiplicativeSemigroup
-
def
trySum(as: TraversableOnce[Boolean]): Option[Boolean]
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
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
without(a: Boolean, b: Boolean): Boolean
The operation of relative complement, symbolically often denoted
a\b
(the symbol for set-theoretic difference, which is the meaning of relative complement in the lattice of sets). -
def
xor(a: Boolean, b: Boolean): Boolean
Logical exclusive or, set-theoretic symmetric difference.
-
def
zero: Boolean
- Definition Classes
- BooleanAlgebra → AdditiveMonoid → BoundedJoinSemilattice