public final class UnivariateGCD extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends IUnivariatePolynomial<T>> |
EuclidFirstBezoutCoefficient(T a,
T b)
Returns array of
[gcd(a,b), s] such that s * a + t * b = gcd(a, b) |
static <T extends IUnivariatePolynomial<T>> |
EuclidGCD(T a,
T b)
Returns the GCD calculated with Euclidean algorithm.
|
static <T extends IUnivariatePolynomial<T>> |
ExtendedEuclidGCD(T a,
T b)
Runs extended Euclidean algorithm to compute
[gcd(a,b), s, t] such that s * a + t * b = gcd(a,
b). |
static <T extends IUnivariatePolynomial<T>> |
ExtendedHalfGCD(T a,
T b)
Runs extended Half-GCD algorithm to compute
[gcd(a,b), s, t] such that s * a + t * b = gcd(a, b). |
static <T extends IUnivariatePolynomial<T>> |
HalfGCD(T a,
T b)
Half-GCD algorithm.
|
static UnivariatePolynomial<Rational<BigInteger>>[] |
ModularExtendedRationalGCD(UnivariatePolynomial<Rational<BigInteger>> a,
UnivariatePolynomial<Rational<BigInteger>> b)
Computes
[gcd(a,b), s, t] such that s * a + t * b = gcd(a, b). |
static UnivariatePolynomial<Rational<BigInteger>>[] |
ModularExtendedResultantGCDInQ(UnivariatePolynomial<Rational<BigInteger>> a,
UnivariatePolynomial<Rational<BigInteger>> b)
Modular extended GCD algorithm for polynomials over Q with the use of resultants.
|
static UnivariatePolynomial<BigInteger>[] |
ModularExtendedResultantGCDInZ(UnivariatePolynomial<BigInteger> a,
UnivariatePolynomial<BigInteger> b)
Modular extended GCD algorithm for polynomials over Z with the use of resultants.
|
static UnivariatePolynomial<BigInteger> |
ModularGCD(UnivariatePolynomial<BigInteger> a,
UnivariatePolynomial<BigInteger> b)
Modular GCD algorithm for polynomials over Z.
|
static UnivariatePolynomialZ64 |
ModularGCD(UnivariatePolynomialZ64 a,
UnivariatePolynomialZ64 b)
Modular GCD algorithm for polynomials over Z.
|
static <T extends IUnivariatePolynomial<T>> |
PolynomialExtendedGCD(T a,
T b)
Computes
[gcd(a,b), s, t] such that s * a + t * b = gcd(a, b). |
static <T extends IUnivariatePolynomial<T>> |
PolynomialFirstBezoutCoefficient(T a,
T b)
Returns array of
[gcd(a,b), s] such that s * a + t * b = gcd(a, b) |
static <T extends IUnivariatePolynomial<T>> |
PolynomialGCD(Iterable<T> polynomials)
Returns GCD of a list of polynomials.
|
static <T extends IUnivariatePolynomial<T>> |
PolynomialGCD(T... polynomials)
Returns GCD of a list of polynomials.
|
static <T extends IUnivariatePolynomial<T>> |
PolynomialGCD(T a,
T b)
Calculates the GCD of two polynomials.
|
static UnivariatePolynomial<UnivariatePolynomial<Rational<BigInteger>>> |
PolynomialGCDInNumberField(UnivariatePolynomial<UnivariatePolynomial<Rational<BigInteger>>> a,
UnivariatePolynomial<UnivariatePolynomial<Rational<BigInteger>>> b)
Computes GCD via Langemyr & Mccallum modular algorithm over algebraic number field
|
static UnivariatePolynomial<UnivariatePolynomial<BigInteger>> |
PolynomialGCDInRingOfIntegersOfNumberField(UnivariatePolynomial<UnivariatePolynomial<BigInteger>> a,
UnivariatePolynomial<UnivariatePolynomial<BigInteger>> b)
Computes some GCD associate via Langemyr & Mccallum modular algorithm over algebraic integers
|
static boolean |
updateCRT(ChineseRemainders.ChineseRemaindersMagic<BigInteger> magic,
UnivariatePolynomial<BigInteger> accumulated,
UnivariatePolynomialZp64 update)
Apply CRT to a poly
|
public static <T extends IUnivariatePolynomial<T>> T PolynomialGCD(T a, T b)
a - the first polynomialb - the second polynomialpublic static <T extends IUnivariatePolynomial<T>> T[] PolynomialExtendedGCD(T a, T b)
[gcd(a,b), s, t] such that s * a + t * b = gcd(a, b). Either resultant-based modular
or Half-GCD algorithm is used.a - the polynomialb - the polynomial[gcd(a,b), s, t] such that s * a + t * b = gcd(a, b) (gcd is monic)ExtendedHalfGCD(IUnivariatePolynomial, IUnivariatePolynomial)public static <T extends IUnivariatePolynomial<T>> T[] PolynomialFirstBezoutCoefficient(T a, T b)
[gcd(a,b), s] such that s * a + t * b = gcd(a, b)a - the first poly for which the Bezout coefficient is computedb - the second poly[gcd(a,b), s] such that s * a + t * b = gcd(a, b)public static <T extends IUnivariatePolynomial<T>> T PolynomialGCD(T... polynomials)
polynomials - a set of polynomialspublic static <T extends IUnivariatePolynomial<T>> T PolynomialGCD(Iterable<T> polynomials)
polynomials - a set of polynomialspublic static <T extends IUnivariatePolynomial<T>> T EuclidGCD(T a, T b)
ArithmeticException may be thrown in case when some exact
divisions are not possible.a - polyb - polypublic static <T extends IUnivariatePolynomial<T>> T[] ExtendedEuclidGCD(T a, T b)
[gcd(a,b), s, t] such that s * a + t * b = gcd(a,
b). If coefficient ring of the input is not a field (and thus polynomials does not form an integral ring),
ArithmeticException may be thrown in case when some exact divisions are not possible.a - the polynomialb - the polynomial[gcd(a,b), s, t] such that s * a + t * b = gcd(a, b)public static <T extends IUnivariatePolynomial<T>> T[] EuclidFirstBezoutCoefficient(T a, T b)
[gcd(a,b), s] such that s * a + t * b = gcd(a, b)a - the first poly for which the Bezout coefficient is computedb - the second poly[gcd(a,b), s] such that s * a + t * b = gcd(a, b)public static <T extends IUnivariatePolynomial<T>> T HalfGCD(T a, T b)
ArithmeticException may be thrown in case when some exact divisions are not possible.a - polyb - polypublic static <T extends IUnivariatePolynomial<T>> T[] ExtendedHalfGCD(T a, T b)
[gcd(a,b), s, t] such that s * a + t * b = gcd(a, b).
If coefficient ring of the input is not a field (and thus polynomials does not form an integral ring), ArithmeticException may be thrown in case when some exact divisions are not possible.a - the polynomialb - the polynomial[gcd(a,b), s, t] such that s * a + t * b = gcd(a, b) (gcd is monic)public static UnivariatePolynomialZ64 ModularGCD(UnivariatePolynomialZ64 a, UnivariatePolynomialZ64 b)
a - the first polynomialb - the second polynomialpublic static UnivariatePolynomial<BigInteger> ModularGCD(UnivariatePolynomial<BigInteger> a, UnivariatePolynomial<BigInteger> b)
a - the first polynomialb - the second polynomialpublic static UnivariatePolynomial<Rational<BigInteger>>[] ModularExtendedRationalGCD(UnivariatePolynomial<Rational<BigInteger>> a, UnivariatePolynomial<Rational<BigInteger>> b)
[gcd(a,b), s, t] such that s * a + t * b = gcd(a, b).a - the polynomialb - the polynomial[gcd(a,b), s, t] such that s * a + t * b = gcd(a, b) (gcd is monic)ExtendedHalfGCD(IUnivariatePolynomial, IUnivariatePolynomial)public static UnivariatePolynomial<Rational<BigInteger>>[] ModularExtendedResultantGCDInQ(UnivariatePolynomial<Rational<BigInteger>> a, UnivariatePolynomial<Rational<BigInteger>> b)
[gcd(a,b), s, t] such that s * a + t * b = gcd(a, b) (gcd is monic)public static UnivariatePolynomial<BigInteger>[] ModularExtendedResultantGCDInZ(UnivariatePolynomial<BigInteger> a, UnivariatePolynomial<BigInteger> b)
[gcd(a,b), s, t] such that s * a + t * b = gcd(a, b) (gcd is monic)public static UnivariatePolynomial<UnivariatePolynomial<Rational<BigInteger>>> PolynomialGCDInNumberField(UnivariatePolynomial<UnivariatePolynomial<Rational<BigInteger>>> a, UnivariatePolynomial<UnivariatePolynomial<Rational<BigInteger>>> b)
public static UnivariatePolynomial<UnivariatePolynomial<BigInteger>> PolynomialGCDInRingOfIntegersOfNumberField(UnivariatePolynomial<UnivariatePolynomial<BigInteger>> a, UnivariatePolynomial<UnivariatePolynomial<BigInteger>> b)
public static boolean updateCRT(ChineseRemainders.ChineseRemaindersMagic<BigInteger> magic, UnivariatePolynomial<BigInteger> accumulated, UnivariatePolynomialZp64 update)
Copyright © 2022. All rights reserved.