public class IntCRTMath extends IntBaseMath
int
type.Constructor and Description |
---|
IntCRTMath(int radix)
Creates a carry-CRT math using the specified radix.
|
Modifier and Type | Method and Description |
---|---|
int |
add(int[] src,
int[] srcDst)
Adds three words.
|
int |
compare(int[] src1,
int[] src2)
Compares three words.
|
int |
divide(int[] srcDst)
Divides three words by the base to produce two words.
|
void |
multiply(int[] src,
int factor,
int[] dst)
Multiplies two words by one word to produce a result of three words.
|
void |
subtract(int[] src,
int[] srcDst)
Subtracts three words.
|
baseAdd, baseDivide, baseMultiplyAdd, baseSubtract
public IntCRTMath(int radix)
radix
- The radix that will be used.public final void multiply(int[] src, int factor, int[] dst)
src
- Source array, first multiplicand.factor
- Second multiplicand.dst
- Destination array.public final int compare(int[] src1, int[] src2)
src1
- First operand.src2
- Second operand.src1 < src2
, greater than zero if src1 > src2
and zero if src1 == src2
.public final int add(int[] src, int[] srcDst)
src
- First operand.srcDst
- Second operand, and destination of the operation.public final void subtract(int[] src, int[] srcDst)
src
- First operand.srcDst
- Second operand, and destination of the operation.public final int divide(int[] srcDst)
srcDst
- Source and destination of the operation.Copyright © 2019. All rights reserved.