Class ModulusPoly
- java.lang.Object
-
- com.google.zxing.pdf417.decoder.ec.ModulusPoly
-
final class ModulusPoly extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private int[]coefficientsprivate ModulusGFfield
-
Constructor Summary
Constructors Constructor Description ModulusPoly(ModulusGF field, int[] coefficients)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ModulusPolyadd(ModulusPoly other)(package private) intevaluateAt(int a)(package private) intgetCoefficient(int degree)(package private) int[]getCoefficients()(package private) intgetDegree()(package private) booleanisZero()(package private) ModulusPolymultiply(int scalar)(package private) ModulusPolymultiply(ModulusPoly other)(package private) ModulusPolymultiplyByMonomial(int degree, int coefficient)(package private) ModulusPolynegative()(package private) ModulusPolysubtract(ModulusPoly other)java.lang.StringtoString()
-
-
-
Field Detail
-
field
private final ModulusGF field
-
coefficients
private final int[] coefficients
-
-
Constructor Detail
-
ModulusPoly
ModulusPoly(ModulusGF field, int[] coefficients)
-
-
Method Detail
-
getCoefficients
int[] getCoefficients()
-
getDegree
int getDegree()
- Returns:
- degree of this polynomial
-
isZero
boolean isZero()
- Returns:
- true iff this polynomial is the monomial "0"
-
getCoefficient
int getCoefficient(int degree)
- Returns:
- coefficient of x^degree term in this polynomial
-
evaluateAt
int evaluateAt(int a)
- Returns:
- evaluation of this polynomial at a given point
-
add
ModulusPoly add(ModulusPoly other)
-
subtract
ModulusPoly subtract(ModulusPoly other)
-
multiply
ModulusPoly multiply(ModulusPoly other)
-
negative
ModulusPoly negative()
-
multiply
ModulusPoly multiply(int scalar)
-
multiplyByMonomial
ModulusPoly multiplyByMonomial(int degree, int coefficient)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-