GF2nElement
| Modifier and Type | Field and Description |
|---|---|
| private GF2nElement[] | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | GF2nPolynomial(int
-
the maximum degree + 1 deg, GF2nElement -
a GF2nElement elem)Creates a new PolynomialGF2n of size deg and elem as coefficients. |
| private | |
| public | GF2nPolynomial(GF2nPolynomial
the PolynomialGF2n to clone a)Creates a new PolynomialGF2n by cloning the given PolynomialGF2n a. |
| public | GF2nPolynomial(GF2Polynomial
the Bitstring to use polynomial, GF2nField the field B1)Creates a new PolynomialGF2n from the given Bitstring polynomial over the GF2nField B1. |
| Modifier and Type | Method and Description |
|---|---|
| public final GF2nPolynomial | Returns: this + b-
the PolynomialGF2n to add b)Adds the PolynomialGF2n b to this and returns the result in a new PolynomialGF2n. |
| public final void | |
| public final GF2nElement | Returns: the GF2nElement stored as coefficient indexthe index index)Returns the coefficient at index. |
| public final GF2nPolynomial[] | Returns: the quotient and remainder of this / bthe divisor b)Divides this by b and stores the result in a new PolynomialGF2n[2], quotient in result[0] and remainder in result[1]. |
| public final void | |
| public final boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public final GF2nPolynomial | Returns: gcd(this, g)-
a GF2nPolynomial g)Computes the greatest common divisor of this and g and returns the result in a new PolynomialGF2n. |
| public final int | |
| public int | Returns: the hash code of this polynomialOverrides java. |
| public final boolean | |
| public final GF2nPolynomial | Returns: this * bthe PolynomialGF2n to multiply b)Multiplies this by b and returns the result in a new PolynomialGF2n. |
| public final GF2nPolynomial | Returns: this * b mod gthe PolynomialGF2n to multiply b, GF2nPolynomial the modul g)Multiplies this by b, reduces the result by g and returns it in a new PolynomialGF2n. |
| public final GF2nPolynomial | Returns: the quotient this / bthe divisor b)Divides this by b and stores the quotient in a new PolynomialGF2n. |
| public final GF2nPolynomial | Returns: this % g-
the modulus g)Reduces this by g and returns the result in a new PolynomialGF2n. |
| public final GF2nPolynomial | Returns: the remainder this % bthe divisor b)Divides this by b and stores the remainder in a new PolynomialGF2n. |
| public final GF2nPolynomial | Returns: this x sthe scalar to multiply s)Multiplies the scalar s to each coefficient of this PolynomialGF2n and returns the result in a new PolynomialGF2n. |
| public final void | set(int
the index index, GF2nElement the GF2nElement to store as coefficient index elem)Sets the coefficient at index to elem. |
| public final GF2nPolynomial | |
| public final void | shiftThisLeft(int
the amount to shift the coefficients amount)Shifts left this by amount and stores the result in this PolynomialGF2n. |
| public final void | |
| public final int | Returns: the size (=maximum degree + 1) of this PolynomialGF2n.Returns the size (=maximum degree + 1) of this PolynomialGF2n. |
| GF2nPolynomial | back to summary |
|---|---|
| public GF2nPolynomial(int deg, GF2nElement elem) Creates a new PolynomialGF2n of size deg and elem as coefficients.
| |
| GF2nPolynomial | back to summary |
|---|---|
| private GF2nPolynomial(int deg) Creates a new PolynomialGF2n of size deg.
| |
| GF2nPolynomial | back to summary |
|---|---|
| public GF2nPolynomial(GF2nPolynomial a) Creates a new PolynomialGF2n by cloning the given PolynomialGF2n a.
| |
| GF2nPolynomial | back to summary |
|---|---|
| public GF2nPolynomial(GF2Polynomial polynomial, GF2nField B1) Creates a new PolynomialGF2n from the given Bitstring polynomial over the GF2nField B1.
| |
| add | back to summary |
|---|---|
| public final GF2nPolynomial add(GF2nPolynomial b) Adds the PolynomialGF2n b to this and returns the result in a new PolynomialGF2n.
| |
| assignZeroToElements | back to summary |
|---|---|
| public final void assignZeroToElements() | |
| at | back to summary |
|---|---|
| public final GF2nElement at(int index) Returns the coefficient at index.
| |
| divide | back to summary |
|---|---|
| public final GF2nPolynomial[] divide(GF2nPolynomial b) Divides this by b and stores the result in a new PolynomialGF2n[2], quotient in result[0] and remainder in result[1].
| |
| enlarge | back to summary |
|---|---|
| public final void enlarge(int k) Enlarges the size of this PolynomialGF2n to k + 1.
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object other) 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.
| |
| gcd | back to summary |
|---|---|
| public final GF2nPolynomial gcd(GF2nPolynomial g) Computes the greatest common divisor of this and g and returns the result in a new PolynomialGF2n.
| |
| getDegree | back to summary |
|---|---|
| public final int getDegree() Returns the degree of this PolynomialGF2n.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isZero | back to summary |
|---|---|
| public final boolean isZero() Returns true if all coefficients equal zero.
| |
| multiply | back to summary |
|---|---|
| public final GF2nPolynomial multiply(GF2nPolynomial b) Multiplies this by b and returns the result in a new PolynomialGF2n.
| |
| multiplyAndReduce | back to summary |
|---|---|
| public final GF2nPolynomial multiplyAndReduce(GF2nPolynomial b, GF2nPolynomial g) Multiplies this by b, reduces the result by g and returns it in a new PolynomialGF2n.
| |
| quotient | back to summary |
|---|---|
| public final GF2nPolynomial quotient(GF2nPolynomial b) throws RuntimeException, ArithmeticException Divides this by b and stores the quotient in a new PolynomialGF2n.
| |
| reduce | back to summary |
|---|---|
| public final GF2nPolynomial reduce(GF2nPolynomial g) throws RuntimeException, ArithmeticException Reduces this by g and returns the result in a new PolynomialGF2n.
| |
| remainder | back to summary |
|---|---|
| public final GF2nPolynomial remainder(GF2nPolynomial b) throws RuntimeException, ArithmeticException Divides this by b and stores the remainder in a new PolynomialGF2n.
| |
| scalarMultiply | back to summary |
|---|---|
| public final GF2nPolynomial scalarMultiply(GF2nElement s) Multiplies the scalar s to each coefficient of this PolynomialGF2n and returns the result in a new PolynomialGF2n.
| |
| set | back to summary |
|---|---|
| public final void set(int index, GF2nElement elem) Sets the coefficient at index to elem.
| |
| shiftLeft | back to summary |
|---|---|
| public final GF2nPolynomial shiftLeft(int amount) | |
| shiftThisLeft | back to summary |
|---|---|
| public final void shiftThisLeft(int amount) Shifts left this by amount and stores the result in this PolynomialGF2n.
| |
| shrink | back to summary |
|---|---|
| public final void shrink() | |
| size | back to summary |
|---|---|
| public final int size() Returns the size (=maximum degree + 1) of this PolynomialGF2n. This is not the degree, use getDegree instead.
| |