|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apfloat.internal.LongCRTMath
public class LongCRTMath
Basic arithmetic for calculating the Chinese Remainder
Theorem. Works for the long type.
| Constructor Summary | |
|---|---|
LongCRTMath(int radix)
Creates a carry-CRT math using the specified radix. |
|
| Method Summary | |
|---|---|
long |
add(long[] src,
long[] srcDst)
Adds three words. |
long |
compare(long[] src1,
long[] src2)
Compares three words. |
long |
divide(long[] srcDst)
Divides three words by the base to produce two words. |
void |
multiply(long[] src,
long factor,
long[] dst)
Multiplies two words by one word to produce a result of three words. |
void |
subtract(long[] src,
long[] srcDst)
Subtracts three words. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LongCRTMath(int radix)
radix - The radix that will be used.| Method Detail |
|---|
public final void multiply(long[] src,
long factor,
long[] dst)
src - Source array, first multiplicand.factor - Second multiplicand.dst - Destination array.
public final long compare(long[] src1,
long[] src2)
src1 - First operand.src2 - Second operand.
src1 < src2, greater than zero if src1 > src2 and zero if src1 == src2.
public final long add(long[] src,
long[] srcDst)
src - First operand.srcDst - Second operand, and destination of the operation.
public final void subtract(long[] src,
long[] srcDst)
src - First operand.srcDst - Second operand, and destination of the operation.public final long divide(long[] srcDst)
srcDst - Source and destination of the operation.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||