Class BigIntegers
java.lang.Object
dk.jonaslindstrom.ruffini.integers.structures.BigIntegers
- All Implemented Interfaces:
AdditiveGroup<BigInteger>
,CommutativeMonoid<BigInteger>
,EuclideanDomain<BigInteger>
,Monoid<BigInteger>
,OrderedSet<BigInteger>
,Ring<BigInteger>
,Semigroup<BigInteger>
,SemiRing<BigInteger>
,Set<BigInteger>
public class BigIntegers
extends Object
implements EuclideanDomain<BigInteger>, OrderedSet<BigInteger>
-
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.boolean
equals
(BigInteger a, BigInteger b) Returnstrue
if and only if a = b as elements of this set.static BigIntegers
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)
.toString()
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, wait, wait, wait
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.AdditiveGroup
doubling, isZero, scale, scale, subtract, sum
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.CommutativeMonoid
add, add
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.EuclideanDomain
abs, divide, divideExact, divideExact, divides, mod, mod
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.Monoid
isIdentity, power
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.OrderedSet
greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual
-
Method Details
-
getInstance
-
identity
Description copied from interface:Monoid
Return the identity element of this monoid.- Specified by:
identity
in interfaceMonoid<BigInteger>
-
multiply
Description copied from interface:Semigroup
Return the result of the product ab in this group.- Specified by:
multiply
in interfaceSemigroup<BigInteger>
-
toString
Description copied from interface:Set
Returns a human-readable string representation of an element in this set.- Specified by:
toString
in interfaceSet<BigInteger>
-
equals
Description copied from interface:Set
Returnstrue
if and only if a = b as elements of this set.- Specified by:
equals
in interfaceSet<BigInteger>
-
add
Description copied from interface:CommutativeMonoid
Return the result of a+b.- Specified by:
add
in interfaceCommutativeMonoid<BigInteger>
-
negate
Description copied from interface:AdditiveGroup
Return -a.- Specified by:
negate
in interfaceAdditiveGroup<BigInteger>
-
zero
Description copied from interface:CommutativeMonoid
Return the zero element.- Specified by:
zero
in interfaceCommutativeMonoid<BigInteger>
-
divide
Description copied from interface:EuclideanDomain
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.- Specified by:
divide
in interfaceEuclideanDomain<BigInteger>
-
norm
Description copied from interface:EuclideanDomain
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)
.- Specified by:
norm
in interfaceEuclideanDomain<BigInteger>
-
toString
-
getOrdering
- Specified by:
getOrdering
in interfaceOrderedSet<BigInteger>
-