This enhancement makes the generation of random BigIntegers faster, using
directly a random generated int[] magnitude array instead of a byte[]
array. This permits to call trustedStripLeadingZeroInts() instead of
stripLeadingZeroBytes(), in order to avoid copying the contents of the
byte[] array in
The Rational class provides operations for arithmetic, rounding,
comparison, hashing, and format conversion. The toString method provides a
canonical representation of a Rational. All the calculations performed have
an exact result, except for the square and nth roots, in which the user can
specify
This enanchment is useful for applications that make heavy use of BitSet
objects as sets of integers, and therefore they need to make a lot of calls
to cardinality() method, which in BitSet class require linear time in the
number of words in use by the bit set.
This optimization reduces the cost of
The cardinality is saved as a field, new method for testing subset relation.
The enanchment is useful for applications that make heavy use of BitSet
objects as sets of integers, and therefore they need to make a lot of calls
to cardinality() method, which actually require linear time in the number
Added the methods deepCopyOf(U[] original, Class newType)
and deepCopyOf(T[] original), that perform a deep copy of the structure of
multidimensional arrays. Also, added a pre-calculation of the string
builders capacity for toString() of primitive array types, based on the
mold of BitSet.toString()