Uses of Class
org.znerd.math.IntegerNumber
-
Uses of IntegerNumber in org.znerd.math
Subclasses of IntegerNumber in org.znerd.mathModifier and TypeClassDescriptionfinal classBasic implementation of an integer number.final classImplementation of anIntegerNumberbased on aintvalue.Methods in org.znerd.math that return IntegerNumberModifier and TypeMethodDescriptionfinal IntegerNumberIntegerNumber.absInteger()Computes |this| and returns anIntegerNumber.BigIntegerNumber.add(IntegerNumber n) abstract IntegerNumberIntegerNumber.add(IntegerNumber n) Computes this + n, where n is an integer number.SmallIntegerNumber.add(IntegerNumber n) static IntegerNumberNumberCentral.createInteger(byte[] bytes) Returns an integer number from a byte array in two's complement notation.static IntegerNumberNumberCentral.createRandomInteger(int numBytes) Returns anIntegerNumberwith a random value.IntegerNumber.dec()Computes this-1.SmallIntegerNumber.dec()IntegerNumber.fac()Computes this!.IntegerNumber.gcd(IntegerNumber n) Computes the greatest common divisor of this and n.final IntegerNumberRationalNumber.getDenominator()Returns the denominator of this fraction.final IntegerNumberRationalNumber.getNumerator()Returns the numerator of this fraction.IntegerNumber.inc()Computes this+1.SmallIntegerNumber.inc()BigIntegerNumber.integerDivide(IntegerNumber n) abstract IntegerNumberIntegerNumber.integerDivide(IntegerNumber n) Computes the integer result of this/n, where n is an integer number.SmallIntegerNumber.integerDivide(IntegerNumber n) BigIntegerNumber.multiply(IntegerNumber n) abstract IntegerNumberIntegerNumber.multiply(IntegerNumber n) Computes this * n, where n is an integer number.SmallIntegerNumber.multiply(IntegerNumber n) IntegerNumber.negateInteger()Computes -this and returns anIntegerNumber.SmallIntegerNumber.negateInteger()IntegerNumber.remainder(IntegerNumber n) Computes the remainder of this/n, where n is an integer number.SmallIntegerNumber.remainder(IntegerNumber n) IntegerNumber.subtract(IntegerNumber n) Computes this - n, where n is an integer number.final IntegerNumberIntegerNumber.trunc()Power.trunc()Product.trunc()Rounds to an integer number towards 0.RationalNumber.trunc()RealNumber.trunc()Rounds to an integer number towards 0.Sum.trunc()Rounds to an integer number towards 0.static IntegerNumberNumberCentral.valueOf(byte n) Converts abyteto anIntegerNumber.static IntegerNumberNumberCentral.valueOf(int n) Converts anintto anIntegerNumber.static IntegerNumberNumberCentral.valueOf(long n) Converts alongto anIntegerNumber.static IntegerNumberNumberCentral.valueOf(short n) Converts ashortto anIntegerNumber.static IntegerNumberNumberCentral.valueOf(BigInteger n) Converts aBigIntegerto anIntegerNumber.Methods in org.znerd.math with parameters of type IntegerNumberModifier and TypeMethodDescriptionBigIntegerNumber.add(IntegerNumber n) abstract IntegerNumberIntegerNumber.add(IntegerNumber n) Computes this + n, where n is an integer number.SmallIntegerNumber.add(IntegerNumber n) protected final intIntegerNumber.compareTo(IntegerNumber n) Compares this number with the specified integer number, first level.protected intIntegerNumber.compareToImpl(IntegerNumber n) Compares this number with the specified integer number, second level.protected intSmallIntegerNumber.compareToImpl(IntegerNumber n) static RationalNumberNumberCentral.createFraction(IntegerNumber numerator, IntegerNumber denominator) Returns a fraction with the given numerator and denominator.static BasicRationalNumberBasicRationalNumber.createInstance(IntegerNumber numerator, IntegerNumber denominator) Returns an instance of aBasicRationalNumberwith the given numerator and denominator.IntegerNumber.gcd(IntegerNumber n) Computes the greatest common divisor of this and n.BigIntegerNumber.integerDivide(IntegerNumber n) abstract IntegerNumberIntegerNumber.integerDivide(IntegerNumber n) Computes the integer result of this/n, where n is an integer number.SmallIntegerNumber.integerDivide(IntegerNumber n) booleanIntegerNumber.isRelativePrime(IntegerNumber n) Determines if this and n are relative primes.BigIntegerNumber.multiply(IntegerNumber n) abstract IntegerNumberIntegerNumber.multiply(IntegerNumber n) Computes this * n, where n is an integer number.SmallIntegerNumber.multiply(IntegerNumber n) final RationalNumberRationalNumber.pow(IntegerNumber n) IntegerNumber.powImpl(IntegerNumber n) protected RationalNumberRationalNumber.powImpl(IntegerNumber n) IntegerNumber.remainder(IntegerNumber n) Computes the remainder of this/n, where n is an integer number.SmallIntegerNumber.remainder(IntegerNumber n) IntegerNumber.subtract(IntegerNumber n) Computes this - n, where n is an integer number.Constructors in org.znerd.math with parameters of type IntegerNumberModifierConstructorDescriptionprotectedBasicRationalNumber(IntegerNumber numerator, IntegerNumber denominator) Constructs a newBasicRationalNumberfrom a numerator and a denominator.protectedDigitSet(IntegerNumber[] parts, String asString) Creates a newDigitSetinstance.protectedRationalNumber(IntegerNumber[] parts) Constructs a newRationalNumberwith the specified numerator and denominator.protectedRationalNumber(IntegerNumber[] parts, String asString) Constructs a newRationalNumberwith the specified numerator, denominator and textual presentation.