Class TestUtils.TestBigIntegers
java.lang.Object
dk.jonaslindstrom.ruffini.common.util.TestUtils.TestBigIntegers
- All Implemented Interfaces:
AdditiveGroup<BigInteger>,CommutativeMonoid<BigInteger>,EuclideanDomain<BigInteger>,Monoid<BigInteger>,Ring<BigInteger>,Semigroup<BigInteger>,SemiRing<BigInteger>,Set<BigInteger>
- Enclosing class:
- TestUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(BigInteger a, BigInteger b) Return the result of a+b.divide(BigInteger a, BigInteger b) Returns a pair (q, r) such that a = qb + r and 0 ≤ f(r) < f(b) where f is the Euclidean function (seeEuclideanDomain.norm(E)for this domain.booleanequals(BigInteger a, BigInteger b) Returnstrueif and only if a = b as elements of this set.identity()Return the identity element of this monoid.multiply(BigInteger a, BigInteger b) Return the result of the product ab in this group.negate(BigInteger a) Return -a.norm(BigInteger a) The euclidean function is a multiplicative map that maps elements of the domain to the integers and is used in the division ofEuclideanDomain.divide(E, E).Returns a human-readable string representation of an element in this set.zero()Return the zero element.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.AdditiveGroup
doubling, isZero, scale, scale, subtract, sumMethods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.CommutativeMonoid
add, addMethods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.EuclideanDomain
abs, divide, divideExact, divideExact, divides, mod, modMethods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.Monoid
isIdentity, power
-
Constructor Details
-
TestBigIntegers
public TestBigIntegers()
-
-
Method Details
-
negate
Description copied from interface:AdditiveGroupReturn -a.- Specified by:
negatein interfaceAdditiveGroup<BigInteger>
-
add
Description copied from interface:CommutativeMonoidReturn the result of a+b.- Specified by:
addin interfaceCommutativeMonoid<BigInteger>
-
zero
Description copied from interface:CommutativeMonoidReturn the zero element.- Specified by:
zeroin interfaceCommutativeMonoid<BigInteger>
-
identity
Description copied from interface:MonoidReturn the identity element of this monoid.- Specified by:
identityin interfaceMonoid<BigInteger>
-
multiply
Description copied from interface:SemigroupReturn the result of the product ab in this group.- Specified by:
multiplyin interfaceSemigroup<BigInteger>
-
toString
Description copied from interface:SetReturns a human-readable string representation of an element in this set.- Specified by:
toStringin interfaceSet<BigInteger>
-
equals
Description copied from interface:SetReturnstrueif and only if a = b as elements of this set.- Specified by:
equalsin interfaceSet<BigInteger>
-
divide
Description copied from interface:EuclideanDomainReturns a pair (q, r) such that a = qb + r and 0 ≤ f(r) < f(b) where f is the Euclidean function (seeEuclideanDomain.norm(E)for this domain.- Specified by:
dividein interfaceEuclideanDomain<BigInteger>
-
norm
Description copied from interface:EuclideanDomainThe euclidean function is a multiplicative map that maps elements of the domain to the integers and is used in the division ofEuclideanDomain.divide(E, E).- Specified by:
normin interfaceEuclideanDomain<BigInteger>
-