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 Eabs(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 EdivideExact(E a, int b) Compute a/b and throw and exception if the division is not exact.default EdivideExact(E a, E b) Compute a/b and throw and exception if the division is not exact.default booleandefault Edefault EThe 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, sumMethods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.CommutativeMonoid
add, add, add, zeroMethods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.Monoid
identity, isIdentity, powerMethods 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
-