|
Bouncy Castle Cryptography 1.50 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.bouncycastle.pqc.math.ntru.polynomial.BigIntPolynomial
public class BigIntPolynomial
A polynomial with BigInteger coefficients.
Some methods (like add) change the polynomial, others (like mult) do
not but return the result as a new polynomial.
| Constructor Summary | |
|---|---|
BigIntPolynomial(IntegerPolynomial p)
Constructs a BigIntPolynomial from a IntegerPolynomial. |
|
| Method Summary | |
|---|---|
void |
add(BigIntPolynomial b)
Adds another polynomial which can have a different number of coefficients. |
java.lang.Object |
clone()
Makes a copy of the polynomial that is independent of the original. |
BigDecimalPolynomial |
div(java.math.BigDecimal divisor,
int decimalPlaces)
Divides each coefficient by a BigDecimal and rounds the result to decimalPlaces places. |
void |
div(java.math.BigInteger divisor)
Divides each coefficient by a BigInteger and rounds the result to the nearest whole number.Does not return a new polynomial but modifies this polynomial. |
boolean |
equals(java.lang.Object obj)
|
java.math.BigInteger[] |
getCoeffs()
|
int |
getMaxCoeffLength()
Returns the base10 length of the largest coefficient. |
int |
hashCode()
|
void |
mod(java.math.BigInteger modulus)
Takes each coefficient modulo a number. |
void |
mult(java.math.BigInteger factor)
Multiplies each coefficient by a BigInteger. |
BigIntPolynomial |
mult(BigIntPolynomial poly2)
Multiplies the polynomial by another, taking the indices mod N. |
void |
sub(BigIntPolynomial b)
Subtracts another polynomial which can have a different number of coefficients. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BigIntPolynomial(IntegerPolynomial p)
BigIntPolynomial from a IntegerPolynomial. The two polynomials are
independent of each other.
p - the original polynomial| Method Detail |
|---|
public BigIntPolynomial mult(BigIntPolynomial poly2)
poly2 - the polynomial to multiply by
public void add(BigIntPolynomial b)
b - another polynomialpublic void sub(BigIntPolynomial b)
b - another polynomialpublic void mult(java.math.BigInteger factor)
BigInteger. Does not return a new polynomial but modifies this polynomial.
factor - public void div(java.math.BigInteger divisor)
BigInteger and rounds the result to the nearest whole number.
divisor - the number to divide by
public BigDecimalPolynomial div(java.math.BigDecimal divisor,
int decimalPlaces)
BigDecimal and rounds the result to decimalPlaces places.
divisor - the number to divide bydecimalPlaces - the number of fractional digits to round the result to
BigDecimalPolynomialpublic int getMaxCoeffLength()
public void mod(java.math.BigInteger modulus)
modulus - public java.lang.Object clone()
clone in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.math.BigInteger[] getCoeffs()
|
Bouncy Castle Cryptography 1.50 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||