Interface EuclideanDomain<E>
- Type Parameters:
E
- Element type.
- All Superinterfaces:
AdditiveGroup<E>
,CommutativeMonoid<E>
,Monoid<E>
,Ring<E>
,Semigroup<E>
,SemiRing<E>
,Set<E>
- All Known Implementing Classes:
BigIntegers
,Integers
,MultivariatePolynomialRing
,PolynomialRing
,PolynomialRingKaratsuba
,TestUtils.TestBigIntegers
,TestUtils.TestIntegers
A Euclidean domain is a ring with Euclidean division.
-
Method Summary
Modifier and TypeMethodDescriptiondefault E
abs
(E a, Comparator<E> ordering) Return a if a ≥ 0 according to the given ordering, otherwise return -a.Returns a pair (q, r) such that a = qb + r and 0 ≤ f(r) < f(b) where f is the Euclidean function (seenorm(E)
for this domain.Returns a pair (q, r) such that a = qb + r and 0 ≤ f(r) < f(b) where f is the Euclidean function (seenorm(E)
for this domain.default E
divideExact
(E a, int b) Compute a/b and throw and exception if the division is not exact.default E
divideExact
(E a, E b) Compute a/b and throw and exception if the division is not exact.default boolean
default E
default E
The euclidean function is a multiplicative map that maps elements of the domain to the integers and is used in the division ofdivide(E, E)
.Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.AdditiveGroup
doubling, isZero, negate, scale, scale, subtract, sum
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.CommutativeMonoid
add, add, add, zero
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.Monoid
identity, isIdentity, power
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.Semigroup
multiply, multiply, multiply
-
Method Details
-
divide
Returns a pair (q, r) such that a = qb + r and 0 ≤ f(r) < f(b) where f is the Euclidean function (seenorm(E)
for this domain. -
divide
Returns a pair (q, r) such that a = qb + r and 0 ≤ f(r) < f(b) where f is the Euclidean function (seenorm(E)
for this domain. -
divideExact
Compute a/b and throw and exception if the division is not exact. -
divideExact
Compute a/b and throw and exception if the division is not exact. -
mod
-
mod
-
abs
Return a if a ≥ 0 according to the given ordering, otherwise return -a. -
norm
The euclidean function is a multiplicative map that maps elements of the domain to the integers and is used in the division ofdivide(E, E)
. -
divides
-