algebra.ring
Members list
Type members
Classlikes
Attributes
- Companion:
- object
- Source:
- Additive.scala
- Graph
- Supertypes
- trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveGroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Any
- Known subtypes
- trait Rng[A]trait CommutativeRng[A]trait BoolRng[A]class SetBoolRng[A]class BoolRngFromGenBool[A]class BoolRingFromBool[A]trait BoolRing[A]trait CommutativeRing[A]class ByteAlgebraclass IntAlgebraclass LongAlgebraclass ShortAlgebraclass UnitAlgebratrait GCDRing[A]trait EuclideanRing[A]class BigIntAlgebraclass BigIntTruncatedDivisontrait Field[A]class BigDecimalAlgebraclass DoubleAlgebraclass FloatAlgebratrait forCommutativeRing[A]trait Ring[A]trait DivisionRing[A]trait forAdditiveCommutativeGroup[A]
Attributes
- Companion:
- trait
- Source:
- Additive.scala
- Graph
- Supertypes
- Self type
Attributes
- Companion:
- object
- Source:
- Additive.scala
- Graph
- Supertypes
- trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Any
- Known subtypes
- trait AdditiveCommutativeGroup[A]trait Rng[A]trait CommutativeRng[A]trait BoolRng[A]class SetBoolRng[A]class BoolRngFromGenBool[A]class BoolRingFromBool[A]trait BoolRing[A]trait CommutativeRing[A]class ByteAlgebraclass IntAlgebraclass LongAlgebraclass ShortAlgebraclass UnitAlgebratrait GCDRing[A]trait EuclideanRing[A]class BigIntAlgebraclass BigIntTruncatedDivisontrait Field[A]class BigDecimalAlgebraclass DoubleAlgebraclass FloatAlgebratrait forCommutativeRing[A]trait Ring[A]trait DivisionRing[A]trait forAdditiveCommutativeGroup[A]trait Semiring[A]class SetSemiring[A]trait CommutativeSemiring[A]trait CommutativeRig[A]class BooleanAlgebratrait CommutativeSemifield[A]trait Rig[A]trait Semifield[A]trait forAdditiveCommutativeMonoid[A]
Attributes
- Companion:
- trait
- Source:
- Additive.scala
- Graph
- Supertypes
- Self type
Attributes
- Companion:
- object
- Source:
- Additive.scala
- Graph
- Supertypes
- Known subtypes
- trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeGroup[A]trait Rng[A]trait CommutativeRng[A]trait BoolRng[A]class SetBoolRng[A]class BoolRngFromGenBool[A]class BoolRingFromBool[A]trait BoolRing[A]trait CommutativeRing[A]class ByteAlgebraclass IntAlgebraclass LongAlgebraclass ShortAlgebraclass UnitAlgebratrait GCDRing[A]trait EuclideanRing[A]class BigIntAlgebraclass BigIntTruncatedDivisontrait Field[A]class BigDecimalAlgebraclass DoubleAlgebraclass FloatAlgebratrait forCommutativeRing[A]trait Ring[A]trait DivisionRing[A]trait forAdditiveCommutativeGroup[A]trait Semiring[A]class SetSemiring[A]trait CommutativeSemiring[A]trait CommutativeRig[A]class BooleanAlgebratrait CommutativeSemifield[A]trait Rig[A]trait Semifield[A]trait forAdditiveCommutativeMonoid[A]
Attributes
- Companion:
- trait
- Source:
- Additive.scala
- Graph
- Supertypes
- Self type
Attributes
- Companion:
- object
- Source:
- Additive.scala
- Graph
- Supertypes
- Known subtypes
- trait AdditiveCommutativeGroup[A]trait Rng[A]trait CommutativeRng[A]trait BoolRng[A]class SetBoolRng[A]class BoolRngFromGenBool[A]class BoolRingFromBool[A]trait BoolRing[A]trait CommutativeRing[A]class ByteAlgebraclass IntAlgebraclass LongAlgebraclass ShortAlgebraclass UnitAlgebratrait GCDRing[A]trait EuclideanRing[A]class BigIntAlgebraclass BigIntTruncatedDivisontrait Field[A]class BigDecimalAlgebraclass DoubleAlgebraclass FloatAlgebratrait forCommutativeRing[A]trait Ring[A]trait DivisionRing[A]trait forAdditiveCommutativeGroup[A]
Attributes
- Companion:
- trait
- Source:
- Additive.scala
- Graph
- Supertypes
- Self type
- AdditiveGroup.type
Attributes
- Source:
- Additive.scala
- Graph
- Supertypes
- trait AdditiveMonoidFunctions[G]trait AdditiveSemigroupFunctions[G]class Objecttrait Matchableclass Any
- Known subtypes
- object AdditiveCommutativeGroup.typeobject AdditiveGroup.typeobject BoolRng.typeobject CommutativeRng.typetrait RingFunctions[R]object BoolRing.typeobject CommutativeRing.typetrait DivisionRingFunctions[F]object DivisionRing.typetrait GCDRingFunctions[R]trait EuclideanRingFunctions[R]object EuclideanRing.typetrait FieldFunctions[F]object Field.typeobject GCDRing.typeobject Ring.typeobject Rng.type
Attributes
- Companion:
- object
- Source:
- Additive.scala
- Graph
- Supertypes
- Known subtypes
- trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeGroup[A]trait Rng[A]trait CommutativeRng[A]trait BoolRng[A]class SetBoolRng[A]class BoolRngFromGenBool[A]class BoolRingFromBool[A]trait BoolRing[A]trait CommutativeRing[A]class ByteAlgebraclass IntAlgebraclass LongAlgebraclass ShortAlgebraclass UnitAlgebratrait GCDRing[A]trait EuclideanRing[A]class BigIntAlgebraclass BigIntTruncatedDivisontrait Field[A]class BigDecimalAlgebraclass DoubleAlgebraclass FloatAlgebratrait forCommutativeRing[A]trait Ring[A]trait DivisionRing[A]trait forAdditiveCommutativeGroup[A]trait Semiring[A]class SetSemiring[A]trait CommutativeSemiring[A]trait CommutativeRig[A]class BooleanAlgebratrait CommutativeSemifield[A]trait Rig[A]trait Semifield[A]trait forAdditiveCommutativeMonoid[A]trait AdditiveGroup[A]
Attributes
- Companion:
- trait
- Source:
- Additive.scala
- Graph
- Supertypes
- Self type
- AdditiveMonoid.type
Attributes
- Source:
- Additive.scala
- Graph
- Supertypes
- Known subtypes
- object AdditiveCommutativeMonoid.typetrait AdditiveGroupFunctions[G]object AdditiveCommutativeGroup.typeobject AdditiveGroup.typeobject BoolRng.typeobject CommutativeRng.typetrait RingFunctions[R]object BoolRing.typeobject CommutativeRing.typetrait DivisionRingFunctions[F]object DivisionRing.typetrait GCDRingFunctions[R]trait EuclideanRingFunctions[R]object EuclideanRing.typetrait FieldFunctions[F]object Field.typeobject GCDRing.typeobject Ring.typeobject Rng.typeobject AdditiveMonoid.typeobject CommutativeRig.typeobject CommutativeSemifield.typeobject CommutativeSemiring.typeobject Rig.typeobject Semifield.typeobject Semiring.type
Attributes
- Companion:
- object
- Source:
- Additive.scala
- Graph
- Supertypes
- trait Serializableclass Any
- Known subtypes
- trait AdditiveCommutativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeGroup[A]trait Rng[A]trait CommutativeRng[A]trait BoolRng[A]class SetBoolRng[A]class BoolRngFromGenBool[A]class BoolRingFromBool[A]trait BoolRing[A]trait CommutativeRing[A]class ByteAlgebraclass IntAlgebraclass LongAlgebraclass ShortAlgebraclass UnitAlgebratrait GCDRing[A]trait EuclideanRing[A]class BigIntAlgebraclass BigIntTruncatedDivisontrait Field[A]class BigDecimalAlgebraclass DoubleAlgebraclass FloatAlgebratrait forCommutativeRing[A]trait Ring[A]trait DivisionRing[A]trait forAdditiveCommutativeGroup[A]trait Semiring[A]class SetSemiring[A]trait CommutativeSemiring[A]trait CommutativeRig[A]class BooleanAlgebratrait CommutativeSemifield[A]trait Rig[A]trait Semifield[A]trait forAdditiveCommutativeMonoid[A]trait AdditiveMonoid[A]trait AdditiveGroup[A]
Attributes
- Companion:
- trait
- Source:
- Additive.scala
- Graph
- Supertypes
- Self type
- AdditiveSemigroup.type
Attributes
- Source:
- Additive.scala
- Graph
- Supertypes
- Known subtypes
- object AdditiveCommutativeSemigroup.typetrait AdditiveMonoidFunctions[M]object AdditiveCommutativeMonoid.typetrait AdditiveGroupFunctions[G]object AdditiveCommutativeGroup.typeobject AdditiveGroup.typeobject BoolRng.typeobject CommutativeRng.typetrait RingFunctions[R]object BoolRing.typeobject CommutativeRing.typetrait DivisionRingFunctions[F]object DivisionRing.typetrait GCDRingFunctions[R]trait EuclideanRingFunctions[R]object EuclideanRing.typetrait FieldFunctions[F]object Field.typeobject GCDRing.typeobject Ring.typeobject Rng.typeobject AdditiveMonoid.typeobject CommutativeRig.typeobject CommutativeSemifield.typeobject CommutativeSemiring.typeobject Rig.typeobject Semifield.typeobject Semiring.typeobject AdditiveSemigroup.type
A Boolean ring is a ring 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).
A Boolean ring is a ring 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 Boolean ring is equivalent to a Boolean algebra.
See algebra.lattice.BoolFromBoolRing
for details.
Attributes
- Companion:
- object
- Source:
- BoolRing.scala
- Graph
- Supertypes
- trait CommutativeRing[A]trait CommutativeRig[A]trait MultiplicativeCommutativeMonoid[A]trait Ring[A]trait Rig[A]trait MultiplicativeMonoid[A]trait BoolRng[A]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 Serializableclass Any
- Known subtypes
- class BoolRingFromBool[A]
Attributes
- Companion:
- trait
- Source:
- BoolRing.scala
- Graph
- Supertypes
- trait RingFunctions[BoolRing]trait AdditiveGroupFunctions[BoolRing]trait AdditiveMonoidFunctions[BoolRing]class Objecttrait Matchableclass Any
- Self type
- BoolRing.type
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).
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.
Attributes
- Companion:
- object
- Source:
- BoolRng.scala
- Graph
- Supertypes
- 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 Serializableclass Any
- Known subtypes
- Self type
- BoolRng[A]
Attributes
- Companion:
- trait
- Source:
- BoolRng.scala
- Graph
- Supertypes
- trait AdditiveGroupFunctions[BoolRng]trait AdditiveMonoidFunctions[BoolRng]class Objecttrait Matchableclass Any
- Self type
- BoolRng.type
CommutativeRig is a Rig that is commutative under multiplication.
CommutativeRig is a Rig that is commutative under multiplication.
Attributes
- Companion:
- object
- Source:
- CommutativeRig.scala
- Graph
- Supertypes
- trait MultiplicativeCommutativeMonoid[A]trait CommutativeSemiring[A]trait MultiplicativeCommutativeSemigroup[A]trait Rig[A]trait MultiplicativeMonoid[A]trait Semiring[A]trait MultiplicativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Any
- Known subtypes
- 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]
Attributes
- Companion:
- trait
- Source:
- CommutativeRig.scala
- Graph
- Supertypes
- Self type
- CommutativeRig.type
CommutativeRing is a Ring that is commutative under multiplication.
CommutativeRing is a Ring that is commutative under multiplication.
Attributes
- Companion:
- object
- Source:
- CommutativeRing.scala
- Graph
- Supertypes
- trait CommutativeRng[A]trait CommutativeRig[A]trait MultiplicativeCommutativeMonoid[A]trait CommutativeSemiring[A]trait MultiplicativeCommutativeSemigroup[A]trait Ring[A]trait Rng[A]trait AdditiveCommutativeGroup[A]trait AdditiveGroup[A]trait Rig[A]trait MultiplicativeMonoid[A]trait Semiring[A]trait MultiplicativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Any
- Known subtypes
- 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]
Attributes
- Companion:
- trait
- Source:
- CommutativeRing.scala
- Graph
- Supertypes
- Self type
- CommutativeRing.type
CommutativeRng is a Rng that is commutative under multiplication.
CommutativeRng is a Rng that is commutative under multiplication.
Attributes
- Companion:
- object
- Source:
- CommutativeRng.scala
- Graph
- Supertypes
- 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 Serializableclass Any
- Known subtypes
- trait BoolRng[A]class SetBoolRng[A]class BoolRngFromGenBool[A]class BoolRingFromBool[A]trait BoolRing[A]trait CommutativeRing[A]class ByteAlgebraclass IntAlgebraclass LongAlgebraclass ShortAlgebraclass UnitAlgebratrait GCDRing[A]trait EuclideanRing[A]class BigIntAlgebraclass BigIntTruncatedDivisontrait Field[A]class BigDecimalAlgebraclass DoubleAlgebraclass FloatAlgebratrait forCommutativeRing[A]
Attributes
- Companion:
- trait
- Source:
- CommutativeRng.scala
- Graph
- Supertypes
- Self type
- CommutativeRng.type
CommutativeSemifield is a Semifield that is commutative under multiplication.
CommutativeSemifield is a Semifield that is commutative under multiplication.
Attributes
- Companion:
- object
- Source:
- CommutativeSemifield.scala
- Graph
- Supertypes
- trait MultiplicativeCommutativeGroup[A]trait CommutativeRig[A]trait MultiplicativeCommutativeMonoid[A]trait CommutativeSemiring[A]trait MultiplicativeCommutativeSemigroup[A]trait Semifield[A]trait MultiplicativeGroup[A]trait Rig[A]trait MultiplicativeMonoid[A]trait Semiring[A]trait MultiplicativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Any
- Known subtypes
Attributes
- Companion:
- trait
- Source:
- CommutativeSemifield.scala
- Graph
- Supertypes
- Self type
- CommutativeSemifield.type
CommutativeSemiring is a Semiring that is commutative under multiplication.
CommutativeSemiring is a Semiring that is commutative under multiplication.
Attributes
- Companion:
- object
- Source:
- CommutativeSemiring.scala
- Graph
- Supertypes
- trait MultiplicativeCommutativeSemigroup[A]trait Semiring[A]trait MultiplicativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Any
- Known subtypes
- 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]
Attributes
- Companion:
- trait
- Source:
- CommutativeSemiring.scala
- Graph
- Supertypes
- Self type
- CommutativeSemiring.type
Attributes
- Companion:
- object
- Source:
- DivisionRing.scala
- Graph
- Supertypes
- trait Semifield[A]trait MultiplicativeGroup[A]trait Ring[A]trait Rng[A]trait AdditiveCommutativeGroup[A]trait AdditiveGroup[A]trait Rig[A]trait MultiplicativeMonoid[A]trait Semiring[A]trait MultiplicativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Any
- Known subtypes
- Self type
- DivisionRing[A]
Attributes
- Companion:
- trait
- Source:
- DivisionRing.scala
- Graph
- Supertypes
- Self type
- DivisionRing.type
Attributes
- Source:
- DivisionRing.scala
- Graph
- Supertypes
- trait MultiplicativeGroupFunctions[F]trait RingFunctions[F]trait MultiplicativeMonoidFunctions[F]trait MultiplicativeSemigroupFunctions[F]trait AdditiveGroupFunctions[F]trait AdditiveMonoidFunctions[F]trait AdditiveSemigroupFunctions[F]class Objecttrait Matchableclass Any
- Known subtypes
- object DivisionRing.type
EuclideanRing implements a Euclidean domain.
EuclideanRing implements a Euclidean domain.
The formal definition says that every euclidean domain A has (at least one) euclidean function f: A -> N (the natural numbers) where:
(for every x and non-zero y) x = yq + r, and r = 0 or f(r) < f(y).
This generalizes the Euclidean division of integers, where f represents a measure of length (or absolute value), and the previous equation represents finding the quotient and remainder of x and y. So:
quot(x, y) = q mod(x, y) = r
Attributes
- Companion:
- object
- Source:
- EuclideanRing.scala
- Graph
- Supertypes
- trait GCDRing[A]trait CommutativeRing[A]trait CommutativeRng[A]trait CommutativeRig[A]trait MultiplicativeCommutativeMonoid[A]trait CommutativeSemiring[A]trait MultiplicativeCommutativeSemigroup[A]trait Ring[A]trait Rng[A]trait AdditiveCommutativeGroup[A]trait AdditiveGroup[A]trait Rig[A]trait MultiplicativeMonoid[A]trait Semiring[A]trait MultiplicativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Any
- Known subtypes
- class BigIntAlgebraclass BigIntTruncatedDivisontrait Field[A]class BigDecimalAlgebraclass DoubleAlgebraclass FloatAlgebra
- Self type
Attributes
- Companion:
- trait
- Source:
- EuclideanRing.scala
- Graph
- Supertypes
- trait GCDRingFunctions[EuclideanRing]trait RingFunctions[EuclideanRing]class Objecttrait Matchableclass Any
- Self type
- EuclideanRing.type
Attributes
- Source:
- EuclideanRing.scala
- Graph
- Supertypes
- trait GCDRingFunctions[R]trait RingFunctions[R]trait MultiplicativeMonoidFunctions[R]trait MultiplicativeSemigroupFunctions[R]trait AdditiveGroupFunctions[R]trait AdditiveMonoidFunctions[R]trait AdditiveSemigroupFunctions[R]class Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Companion:
- object
- Source:
- Field.scala
- Graph
- Supertypes
- trait CommutativeSemifield[A]trait MultiplicativeCommutativeGroup[A]trait DivisionRing[A]trait Semifield[A]trait MultiplicativeGroup[A]trait EuclideanRing[A]trait GCDRing[A]trait CommutativeRing[A]trait CommutativeRng[A]trait CommutativeRig[A]trait MultiplicativeCommutativeMonoid[A]trait CommutativeSemiring[A]trait MultiplicativeCommutativeSemigroup[A]trait Ring[A]trait Rng[A]trait AdditiveCommutativeGroup[A]trait AdditiveGroup[A]trait Rig[A]trait MultiplicativeMonoid[A]trait Semiring[A]trait MultiplicativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Any
- Known subtypes
- Self type
- Field[A]
Attributes
- Companion:
- trait
- Source:
- Field.scala
- Graph
- Supertypes
- trait FieldFunctions[Field]trait EuclideanRingFunctions[Field]trait GCDRingFunctions[Field]trait RingFunctions[Field]trait AdditiveGroupFunctions[Field]trait AdditiveMonoidFunctions[Field]trait AdditiveSemigroupFunctions[Field]class Objecttrait Matchableclass Any
- Self type
- Field.type
Attributes
- Source:
- Field.scala
- Graph
- Supertypes
- trait MultiplicativeGroupFunctions[F]trait EuclideanRingFunctions[F]trait GCDRingFunctions[F]trait RingFunctions[F]trait MultiplicativeMonoidFunctions[F]trait MultiplicativeSemigroupFunctions[F]trait AdditiveGroupFunctions[F]trait AdditiveMonoidFunctions[F]trait AdditiveSemigroupFunctions[F]class Objecttrait Matchableclass Any
- Known subtypes
- object Field.type
GCDRing implements a GCD ring.
GCDRing implements a GCD ring.
For two elements x and y in a GCD ring, we can choose two elements d and m such that:
d = gcd(x, y) m = lcm(x, y)
d * m = x * y
Additionally, we require:
gcd(0, 0) = 0 lcm(x, 0) = lcm(0, x) = 0
and commutativity:
gcd(x, y) = gcd(y, x) lcm(x, y) = lcm(y, x)
Attributes
- Companion:
- object
- Source:
- GCDRing.scala
- Graph
- Supertypes
- trait CommutativeRing[A]trait CommutativeRng[A]trait CommutativeRig[A]trait MultiplicativeCommutativeMonoid[A]trait CommutativeSemiring[A]trait MultiplicativeCommutativeSemigroup[A]trait Ring[A]trait Rng[A]trait AdditiveCommutativeGroup[A]trait AdditiveGroup[A]trait Rig[A]trait MultiplicativeMonoid[A]trait Semiring[A]trait MultiplicativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Any
- Known subtypes
- trait EuclideanRing[A]class BigIntAlgebraclass BigIntTruncatedDivisontrait Field[A]class BigDecimalAlgebraclass DoubleAlgebraclass FloatAlgebra
Attributes
- Companion:
- trait
- Source:
- GCDRing.scala
- Graph
- Supertypes
- trait GCDRingFunctions[GCDRing]trait RingFunctions[GCDRing]trait AdditiveGroupFunctions[GCDRing]trait AdditiveMonoidFunctions[GCDRing]class Objecttrait Matchableclass Any
- Self type
- GCDRing.type
Attributes
- Source:
- GCDRing.scala
- Graph
- Supertypes
- trait RingFunctions[R]trait MultiplicativeMonoidFunctions[R]trait MultiplicativeSemigroupFunctions[R]trait AdditiveGroupFunctions[R]trait AdditiveMonoidFunctions[R]trait AdditiveSemigroupFunctions[R]class Objecttrait Matchableclass Any
- Known subtypes
- trait EuclideanRingFunctions[R]object EuclideanRing.typetrait FieldFunctions[F]object Field.typeobject GCDRing.type
Attributes
- Companion:
- object
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- trait MultiplicativeCommutativeMonoid[A]trait MultiplicativeCommutativeSemigroup[A]trait MultiplicativeGroup[A]trait MultiplicativeMonoid[A]trait MultiplicativeSemigroup[A]trait Serializableclass Any
- Known subtypes
- trait CommutativeSemifield[A]trait Field[A]class BigDecimalAlgebraclass DoubleAlgebraclass FloatAlgebra
Attributes
- Companion:
- trait
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- Self type
Attributes
- Companion:
- object
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- trait MultiplicativeCommutativeSemigroup[A]trait MultiplicativeMonoid[A]trait MultiplicativeSemigroup[A]trait Serializableclass Any
- Known subtypes
- 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 MultiplicativeCommutativeGroup[A]
Attributes
- Companion:
- trait
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- Self type
Attributes
- Companion:
- object
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- Known subtypes
- 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 MultiplicativeCommutativeMonoid[A]trait MultiplicativeCommutativeGroup[A]
Attributes
- Companion:
- trait
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- Self type
Attributes
- Companion:
- object
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- Known subtypes
- trait MultiplicativeCommutativeGroup[A]trait CommutativeSemifield[A]trait Field[A]class BigDecimalAlgebraclass DoubleAlgebraclass FloatAlgebratrait Semifield[A]trait DivisionRing[A]
Attributes
- Companion:
- trait
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- Self type
- MultiplicativeGroup.type
Attributes
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- trait MultiplicativeMonoidFunctions[G]trait MultiplicativeSemigroupFunctions[G]class Objecttrait Matchableclass Any
- Known subtypes
- object CommutativeSemifield.typetrait DivisionRingFunctions[F]object DivisionRing.typetrait FieldFunctions[F]object Field.typeobject MultiplicativeCommutativeGroup.typeobject MultiplicativeGroup.typeobject Semifield.type
Attributes
- Companion:
- object
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- Known subtypes
- trait MultiplicativeCommutativeMonoid[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 MultiplicativeCommutativeGroup[A]trait MultiplicativeGroup[A]trait Semifield[A]trait DivisionRing[A]trait Rig[A]trait Ring[A]
Attributes
- Companion:
- trait
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- Self type
- MultiplicativeMonoid.type
Attributes
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- Known subtypes
- object CommutativeRig.typeobject MultiplicativeCommutativeMonoid.typetrait MultiplicativeGroupFunctions[G]object CommutativeSemifield.typetrait DivisionRingFunctions[F]object DivisionRing.typetrait FieldFunctions[F]object Field.typeobject MultiplicativeCommutativeGroup.typeobject MultiplicativeGroup.typeobject Semifield.typeobject MultiplicativeMonoid.typeobject Rig.typetrait RingFunctions[R]object BoolRing.typeobject CommutativeRing.typetrait GCDRingFunctions[R]trait EuclideanRingFunctions[R]object EuclideanRing.typeobject GCDRing.typeobject Ring.type
Attributes
- Companion:
- object
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- trait Serializableclass Any
- Known subtypes
- trait MultiplicativeCommutativeSemigroup[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 MultiplicativeCommutativeMonoid[A]trait MultiplicativeCommutativeGroup[A]trait MultiplicativeMonoid[A]trait MultiplicativeGroup[A]trait Semifield[A]trait DivisionRing[A]trait Rig[A]trait Ring[A]trait Semiring[A]class SetSemiring[A]trait Rng[A]
Attributes
- Companion:
- trait
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- Self type
Attributes
- Source:
- Multiplicative.scala
- Graph
- Supertypes
- Known subtypes
- object BoolRng.typeobject CommutativeRng.typeobject CommutativeSemiring.typeobject MultiplicativeCommutativeSemigroup.typetrait MultiplicativeMonoidFunctions[M]object CommutativeRig.typeobject MultiplicativeCommutativeMonoid.typetrait MultiplicativeGroupFunctions[G]object CommutativeSemifield.typetrait DivisionRingFunctions[F]object DivisionRing.typetrait FieldFunctions[F]object Field.typeobject MultiplicativeCommutativeGroup.typeobject MultiplicativeGroup.typeobject Semifield.typeobject MultiplicativeMonoid.typeobject Rig.typetrait RingFunctions[R]object BoolRing.typeobject CommutativeRing.typetrait GCDRingFunctions[R]trait EuclideanRingFunctions[R]object EuclideanRing.typeobject GCDRing.typeobject Ring.typeobject MultiplicativeSemigroup.typeobject Rng.typeobject Semiring.type
Rig consists of:
Rig consists of:
- a commutative monoid for addition (+)
- a monoid for multiplication (*)
Alternately, a Rig can be thought of as a ring without multiplicative or additive inverses (or as a semiring with a multiplicative identity).
Mnemonic: "Rig is a Ring without 'N'egation."
Attributes
- Companion:
- object
- Source:
- Rig.scala
- Graph
- Supertypes
- trait MultiplicativeMonoid[A]trait Semiring[A]trait MultiplicativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Any
- Known subtypes
- 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 Ring[A]trait DivisionRing[A]trait Semifield[A]
Attributes
- Companion:
- trait
- Source:
- Rig.scala
- Graph
- Supertypes
- trait MultiplicativeMonoidFunctions[Rig]trait AdditiveMonoidFunctions[Rig]trait AdditiveSemigroupFunctions[Rig]class Objecttrait Matchableclass Any
- Self type
- Rig.type
Ring consists of:
Ring consists of:
- a commutative group for addition (+)
- a monoid for multiplication (*)
Additionally, multiplication must distribute over addition.
Ring implements some methods (for example fromInt) in terms of other more fundamental methods (zero, one and plus). Where possible, these methods should be overridden by more efficient implementations.
Attributes
- Companion:
- object
- Source:
- Ring.scala
- Graph
- Supertypes
- trait Rng[A]trait AdditiveCommutativeGroup[A]trait AdditiveGroup[A]trait Rig[A]trait MultiplicativeMonoid[A]trait Semiring[A]trait MultiplicativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Any
- Known subtypes
- trait 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 DivisionRing[A]
Attributes
- Companion:
- trait
- Source:
- Ring.scala
- Graph
- Supertypes
- trait RingFunctions[Ring]trait AdditiveGroupFunctions[Ring]trait AdditiveMonoidFunctions[Ring]trait AdditiveSemigroupFunctions[Ring]class Objecttrait Matchableclass Any
- Self type
- Ring.type
Attributes
- Source:
- Ring.scala
- Graph
- Supertypes
- trait MultiplicativeMonoidFunctions[R]trait MultiplicativeSemigroupFunctions[R]trait AdditiveGroupFunctions[R]trait AdditiveMonoidFunctions[R]trait AdditiveSemigroupFunctions[R]class Objecttrait Matchableclass Any
- Known subtypes
- object BoolRing.typeobject CommutativeRing.typetrait DivisionRingFunctions[F]object DivisionRing.typetrait GCDRingFunctions[R]trait EuclideanRingFunctions[R]object EuclideanRing.typetrait FieldFunctions[F]object Field.typeobject GCDRing.typeobject Ring.type
Rng (pronounced "Rung") consists of:
Rng (pronounced "Rung") consists of:
- a commutative group for addition (+)
- a semigroup for multiplication (*)
Alternately, a Rng can be thought of as a ring without a multiplicative identity (or as a semiring with an additive inverse).
Mnemonic: "Rng is a Ring without multiplicative 'I'dentity."
Attributes
- Companion:
- object
- Source:
- Rng.scala
- Graph
- Supertypes
- 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 Serializableclass Any
- Known subtypes
- trait CommutativeRng[A]trait BoolRng[A]class SetBoolRng[A]class BoolRngFromGenBool[A]class BoolRingFromBool[A]trait BoolRing[A]trait CommutativeRing[A]class ByteAlgebraclass IntAlgebraclass LongAlgebraclass ShortAlgebraclass UnitAlgebratrait GCDRing[A]trait EuclideanRing[A]class BigIntAlgebraclass BigIntTruncatedDivisontrait Field[A]class BigDecimalAlgebraclass DoubleAlgebraclass FloatAlgebratrait forCommutativeRing[A]trait Ring[A]trait DivisionRing[A]
Attributes
- Companion:
- trait
- Source:
- Rng.scala
- Graph
- Supertypes
- trait AdditiveGroupFunctions[Rng]trait AdditiveMonoidFunctions[Rng]trait AdditiveSemigroupFunctions[Rng]class Objecttrait Matchableclass Any
- Self type
- Rng.type
Semifield consists of:
Semifield consists of:
- a commutative monoid for addition (+)
- a group for multiplication (*)
Alternately, a Semifield can be thought of as a DivisionRing without an additive inverse.
Attributes
- Companion:
- object
- Source:
- Semifield.scala
- Graph
- Supertypes
- trait MultiplicativeGroup[A]trait Rig[A]trait MultiplicativeMonoid[A]trait Semiring[A]trait MultiplicativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Any
- Known subtypes
- trait CommutativeSemifield[A]trait Field[A]class BigDecimalAlgebraclass DoubleAlgebraclass FloatAlgebratrait DivisionRing[A]
Attributes
- Companion:
- trait
- Source:
- Semifield.scala
- Graph
- Supertypes
- Self type
- Semifield.type
Semiring consists of:
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]
Attributes
- Companion:
- trait
- Source:
- Semiring.scala
- Graph
- Supertypes
- Self type
- Semiring.type
A trait that expresses the existence of signs and absolute values on linearly ordered additive commutative monoids (i.e. types with addition and a zero).
A trait that expresses the existence of signs and absolute values on linearly ordered additive commutative monoids (i.e. types with addition and a zero).
The following laws holds:
(1) if a <= b
then a + c <= b + c
(linear order),
(2) signum(x) = -1
if x < 0
, signum(x) = 1
if x > 0
, signum(x) = 0
otherwise,
Negative elements only appear when the scalar is taken from a additive abelian group. Then:
(3) abs(x) = -x
if x < 0
, or x
otherwise,
Laws (1) and (2) lead to the triange inequality:
(4) abs(a + b) <= abs(a) + abs(b)
Signed should never be extended in implementations, rather the Signed.forAdditiveCommutativeMonoid and subtraits.
It's better to have the Signed hierarchy separate from the Ring/Order hierarchy, so that we do not end up with duplicate implicits.
Attributes
- Companion:
- object
- Source:
- Signed.scala
- Graph
- Supertypes
- class Any
- Known subtypes
- trait forAdditiveCommutativeMonoid[A]trait forAdditiveCommutativeGroup[A]trait forCommutativeRing[A]class BigIntTruncatedDivisontrait TruncatedDivision[A]
Attributes
- Companion:
- trait
- Source:
- Signed.scala
- Graph
- Supertypes
- trait SignedFunctions[Signed]class OrderFunctions[Order]class PartialOrderFunctions[Order]class EqFunctions[Order]class Objecttrait Matchableclass Any
- Self type
- Signed.type
Attributes
- Source:
- Signed.scala
- Graph
- Supertypes
- class OrderFunctions[Order]class PartialOrderFunctions[Order]class EqFunctions[Order]class Objecttrait Matchableclass Any
- Known subtypes
Division and modulus for computer scientists taken from https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/divmodnote-letter.pdf
Division and modulus for computer scientists taken from https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/divmodnote-letter.pdf
For two numbers x (dividend) and y (divisor) on an ordered ring with y != 0, there exists a pair of numbers q (quotient) and r (remainder) such that these laws are satisfied:
(1) q is an integer (2) x = y * q + r (division rule) (3) |r| < |y|, (4t) r = 0 or sign(r) = sign(x), (4f) r = 0 or sign(r) = sign(y).
where sign is the sign function, and the absolute value function |x| is defined as |x| = x if x >=0, and |x| = -x otherwise.
We define functions tmod and tquot such that: q = tquot(x, y) and r = tmod(x, y) obey rule (4t), (which truncates effectively towards zero) and functions fmod and fquot such that: q = fquot(x, y) and r = fmod(x, y) obey rule (4f) (which floors the quotient and effectively rounds towards negative infinity).
Law (4t) corresponds to ISO C99 and Haskell's quot/rem. Law (4f) is described by Knuth and used by Haskell, and fmod corresponds to the REM function of the IEEE floating-point standard.
Attributes
- Companion:
- object
- Source:
- TruncatedDivision.scala
- Graph
- Supertypes
- trait Signed[A]class Any
- Known subtypes
- trait forCommutativeRing[A]class BigIntTruncatedDivison
Attributes
- Companion:
- trait
- Source:
- TruncatedDivision.scala
- Graph
- Supertypes
- trait SignedFunctions[TruncatedDivision]class OrderFunctions[Order]class PartialOrderFunctions[Order]class EqFunctions[Order]class Objecttrait Matchableclass Any
- Self type
- TruncatedDivision.type
Attributes
- Source:
- TruncatedDivision.scala
- Graph
- Supertypes
- trait SignedFunctions[S]class OrderFunctions[Order]class PartialOrderFunctions[Order]class EqFunctions[Order]class Objecttrait Matchableclass Any
- Known subtypes
- object TruncatedDivision.type