algebra.ring.EuclideanRing
See theEuclideanRing companion object
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