public final class PolynomialRingGF2
extends java.lang.Object
GF2mField
Modifier and Type | Method and Description |
---|---|
static int |
add(int p,
int q)
Return sum of two polyomials
|
static int |
degree(int p)
Return the degree of a polynomial
|
static int |
degree(long p)
Return the degree of a polynomial
|
static int |
gcd(int p,
int q)
Return the greatest common divisor of two polynomials
|
static int |
getIrreduciblePolynomial(int deg)
Creates irreducible polynomial with degree d
|
static boolean |
isIrreducible(int p)
Checking polynomial for irreducibility
|
static int |
modMultiply(int a,
int b,
int r)
Compute the product of two polynomials modulo a third polynomial.
|
static long |
multiply(int p,
int q)
Return product of two polynomials
|
static int |
remainder(int p,
int q)
Return the remainder of a polynomial division of two polynomials.
|
static int |
rest(long p,
int q)
Return the rest of devision two polynomials
|
public static int add(int p, int q)
p
- polynomialq
- polynomialpublic static long multiply(int p, int q)
p
- polynomialq
- polynomialpublic static int modMultiply(int a, int b, int r)
a
- the first polynomialb
- the second polynomialr
- the reduction polynomialpublic static int degree(int p)
p
- polynomial ppublic static int degree(long p)
p
- polynomial ppublic static int remainder(int p, int q)
p
- dividendq
- divisorpublic static int rest(long p, int q)
p
- polinomialq
- polinomialpublic static int gcd(int p, int q)
p
- polinomialq
- polinomialpublic static boolean isIrreducible(int p)
p
- polinomialpublic static int getIrreduciblePolynomial(int deg)
deg
- polynomial degree