APIdia Launch Partner
Top Description Fields Constructors Methods
java.math

pack-priv Class SignedMutableBigInteger

extends MutableBigInteger
Class Inheritance

A class used to represent multiprecision integers that makes efficient use of allocated space by allowing a number to occupy only part of an array so that the arrays do not have to be reallocated as often. When performing an operation with many iterations the array used to hold a number is only increased when necessary and does not have to be the same size as the number it represents. A mutable number allows calculations to occur on the same number without having to create a new number for every step of the calculation as occurs with BigIntegers. Note that SignedMutableBigIntegers only support signed addition and subtraction. All other operations occur as with MutableBigIntegers.
Author
Michael McCloskey
Since
1.3
See Also
BigInteger

Field Summary

Modifier and TypeField and Description
pack-priv int
sign

The sign of this MutableBigInteger.

Inherited from java.math.MutableBigInteger:
intLenKNUTH_POW2_THRESH_LENKNUTH_POW2_THRESH_ZEROSoffsetONEvalue

Constructor Summary

AccessConstructor and Description
pack-priv
SignedMutableBigInteger()

The default constructor.

pack-priv
SignedMutableBigInteger(int val)

Construct a new MutableBigInteger with a magnitude specified by the int val.

pack-priv
SignedMutableBigInteger(MutableBigInteger val)

Construct a new MutableBigInteger with a magnitude equal to the specified MutableBigInteger.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
signedAdd(SignedMutableBigInteger addend)

Signed addition built upon unsigned add and subtract.

pack-priv void
signedAdd(MutableBigInteger addend)

Signed addition built upon unsigned add and subtract.

pack-priv void
signedSubtract(SignedMutableBigInteger addend)

Signed subtraction built upon unsigned add and subtract.

pack-priv void
signedSubtract(MutableBigInteger addend)

Signed subtraction built upon unsigned add and subtract.

public String
toString()

Overrides java.math.MutableBigInteger.toString.

Print out the first intLen ints of this MutableBigInteger's value array starting at offset.

Inherited from java.math.MutableBigInteger:
addaddDisjointaddLoweraddShiftedbinaryGcdbitLengthclearcomparecompareHalfcopyValuecopyValuedividedividedividedivideAndRemainderBurnikelZieglerdivideKnuthdivideKnuthdivideOneWordeuclidModInversefixuphybridGCDinverseMod32inverseMod64isEvenisNormalisOddisOneisZeroleftShiftmodInverseBP2modInverseMP2mulmultiplymutableModInversenormalizeresetrightShiftrootnRemsafeLeftShiftsafeRightShiftsetIntsetValueshiftAddshiftAddDisjointsqrtRemsubtracttoBigDecimaltoBigIntegertoBigIntegertoCompactValuetoIntArray

Field Detail

signback to summary
pack-priv int sign

The sign of this MutableBigInteger.

Constructor Detail

SignedMutableBigIntegerback to summary
pack-priv SignedMutableBigInteger()

The default constructor. An empty MutableBigInteger is created with a one word capacity.

SignedMutableBigIntegerback to summary
pack-priv SignedMutableBigInteger(int val)

Construct a new MutableBigInteger with a magnitude specified by the int val.

SignedMutableBigIntegerback to summary
pack-priv SignedMutableBigInteger(MutableBigInteger val)

Construct a new MutableBigInteger with a magnitude equal to the specified MutableBigInteger.

Method Detail

signedAddback to summary
pack-priv void signedAdd(SignedMutableBigInteger addend)

Signed addition built upon unsigned add and subtract.

signedAddback to summary
pack-priv void signedAdd(MutableBigInteger addend)

Signed addition built upon unsigned add and subtract.

signedSubtractback to summary
pack-priv void signedSubtract(SignedMutableBigInteger addend)

Signed subtraction built upon unsigned add and subtract.

signedSubtractback to summary
pack-priv void signedSubtract(MutableBigInteger addend)

Signed subtraction built upon unsigned add and subtract.

toStringback to summary
public String toString()

Overrides java.math.MutableBigInteger.toString.

Print out the first intLen ints of this MutableBigInteger's value array starting at offset.