long value for
faster multiplication in 64 bit environments.long number.
| Access | Constructor and Description |
|---|---|
| public | LongPolynomial2(IntegerPolynomial
the original polynomial. Coefficients must be between 0 and 2047. p)Constructs a |
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | add(LongPolynomial2
another polynomial b)Adds another polynomial which can have a different number of coefficients. |
| public Object | |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public LongPolynomial2 | mult(LongPolynomial2 poly2)
Multiplies the polynomial with another, taking the indices mod N and the values mod 2048. |
| public void | mult2And(int
a bit mask less than 2048 to apply to each 11-bit coefficient mask)Multiplies this polynomial by 2 and applies an AND mask to the upper and lower halves of each coefficients. |
| private LongPolynomial2 | |
| private void | sub(LongPolynomial2
another polynomial b)Subtracts another polynomial which can have a different number of coefficients. |
| public void | subAnd(LongPolynomial2
another polynomial b, int a bit mask less than 2048 to apply to each 11-bit coefficient mask)Subtracts another polynomial which must have the same number of coefficients, and applies an AND mask to the upper and lower halves of each coefficients. |
| public IntegerPolynomial |
| coeffs | back to summary |
|---|---|
| private long[] coeffs | |
| numCoeffs | back to summary |
|---|---|
| private int numCoeffs | |
| LongPolynomial2 | back to summary |
|---|---|
| public LongPolynomial2(IntegerPolynomial p) Constructs a
| |
| LongPolynomial2 | back to summary |
|---|---|
| private LongPolynomial2(long[] coeffs) | |
| LongPolynomial2 | back to summary |
|---|---|
| private LongPolynomial2(int N) | |
| add | back to summary |
|---|---|
| private void add(LongPolynomial2 b) Adds another polynomial which can have a different number of coefficients.
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| mult | back to summary |
|---|---|
| public LongPolynomial2 mult(LongPolynomial2 poly2) Multiplies the polynomial with another, taking the indices mod N and the values mod 2048. | |
| mult2And | back to summary |
|---|---|
| public void mult2And(int mask) Multiplies this polynomial by 2 and applies an AND mask to the upper and lower halves of each coefficients.
| |
| multRecursive | back to summary |
|---|---|
| private LongPolynomial2 multRecursive(LongPolynomial2 poly2) Karazuba multiplication | |
| sub | back to summary |
|---|---|
| private void sub(LongPolynomial2 b) Subtracts another polynomial which can have a different number of coefficients.
| |
| subAnd | back to summary |
|---|---|
| public void subAnd(LongPolynomial2 b, int mask) Subtracts another polynomial which must have the same number of coefficients, and applies an AND mask to the upper and lower halves of each coefficients.
| |
| toIntegerPolynomial | back to summary |
|---|---|
| public IntegerPolynomial toIntegerPolynomial() | |