Package edu.jas.poly

Class PolyUtil


  • public class PolyUtil
    extends java.lang.Object
    Polynomial utilities, for example conversion between different representations, evaluation and interpolation.
    Author:
    Heinz Kredel
    • Method Detail

      • recursive

        public static <C extends RingElem<C>> GenPolynomial<GenPolynomial<C>> recursive​(GenPolynomialRing<GenPolynomial<C>> rfac,
                                                                                        GenPolynomial<C> A)
        Recursive representation. Represent as polynomial in i variables with coefficients in n-i variables. Works for arbitrary term orders.
        Type Parameters:
        C - coefficient type.
        Parameters:
        rfac - recursive polynomial ring factory.
        A - polynomial to be converted.
        Returns:
        Recursive representations of this in the ring rfac.
      • distribute

        public static <C extends RingElem<C>> GenPolynomial<C> distribute​(GenPolynomialRing<C> dfac,
                                                                          GenPolynomial<GenPolynomial<C>> B)
        Distribute a recursive polynomial to a generic polynomial. Works for arbitrary term orders.
        Type Parameters:
        C - coefficient type.
        Parameters:
        dfac - combined polynomial ring factory of coefficients and this.
        B - polynomial to be converted.
        Returns:
        distributed polynomial.
      • recursive

        public static <C extends RingElem<C>> java.util.List<GenPolynomial<GenPolynomial<C>>> recursive​(GenPolynomialRing<GenPolynomial<C>> rfac,
                                                                                                        java.util.List<GenPolynomial<C>> L)
        Recursive representation. Represent as polynomials in i variables with coefficients in n-i variables. Works for arbitrary term orders.
        Type Parameters:
        C - coefficient type.
        Parameters:
        rfac - recursive polynomial ring factory.
        L - list of polynomials to be converted.
        Returns:
        Recursive representations of the list in the ring rfac.
      • distribute

        public static <C extends RingElem<C>> java.util.List<GenPolynomial<C>> distribute​(GenPolynomialRing<C> dfac,
                                                                                          java.util.List<GenPolynomial<GenPolynomial<C>>> L)
        Distribute a recursive polynomial list to a generic polynomial list. Works for arbitrary term orders.
        Type Parameters:
        C - coefficient type.
        Parameters:
        dfac - combined polynomial ring factory of coefficients and this.
        L - list of polynomials to be converted.
        Returns:
        distributed polynomial list.
      • integerFromModularCoefficients

        public static <C extends RingElem<C> & Modular> java.util.List<GenPolynomial<BigInteger>> integerFromModularCoefficients​(GenPolynomialRing<BigInteger> fac,
                                                                                                                                 java.util.List<GenPolynomial<C>> L)
        BigInteger from ModInteger coefficients, symmetric. Represent as polynomial with BigInteger coefficients by removing the modules and making coefficients symmetric to 0.
        Parameters:
        fac - result polynomial factory.
        L - list of polynomials with ModInteger coefficients to be converted.
        Returns:
        list of polynomials with BigInteger coefficients.
      • integerFromRationalCoefficientsFactor

        public static java.lang.Object[] integerFromRationalCoefficientsFactor​(GenPolynomialRing<BigInteger> fac,
                                                                               GenPolynomial<BigRational> A)
        BigInteger from BigRational coefficients. Represent as polynomial with BigInteger coefficients by multiplication with the gcd of the numerators and the lcm of the denominators of the BigRational coefficients.
        Author: Axel Kramer
        Parameters:
        fac - result polynomial factory.
        A - polynomial with BigRational coefficients to be converted.
        Returns:
        Object[] with 3 entries: [0]=gcd [1]=lcm and [2]=polynomial with BigInteger coefficients.
      • integerFromRationalCoefficients

        public static GenPolynomial<BigIntegerintegerFromRationalCoefficients​(GenPolynomialRing<BigInteger> fac,
                                                                                java.math.BigInteger gcd,
                                                                                java.math.BigInteger lcm,
                                                                                GenPolynomial<BigRational> A)
        BigInteger from BigRational coefficients. Represent as polynomial with BigInteger coefficients by multiplication with the gcd of the numerators and the lcm of the denominators of the BigRational coefficients.
        Parameters:
        fac - result polynomial factory.
        gcd - of rational coefficient numerators.
        lcm - of rational coefficient denominators.
        A - polynomial with BigRational coefficients to be converted.
        Returns:
        polynomial with BigInteger coefficients.
      • integerFromRationalCoefficients

        public static java.util.List<GenPolynomial<BigInteger>> integerFromRationalCoefficients​(GenPolynomialRing<BigInteger> fac,
                                                                                                java.util.List<GenPolynomial<BigRational>> L)
        BigInteger from BigRational coefficients. Represent as list of polynomials with BigInteger coefficients by multiplication with the lcm of the numerators of the BigRational coefficients of each polynomial.
        Parameters:
        fac - result polynomial factory.
        L - list of polynomials with BigRational coefficients to be converted.
        Returns:
        polynomial list with BigInteger coefficients.
      • fromIntegerCoefficients

        public static <C extends RingElem<C>> GenPolynomial<C> fromIntegerCoefficients​(GenPolynomialRing<C> fac,
                                                                                       GenPolynomial<BigInteger> A)
        From BigInteger coefficients. Represent as polynomial with type C coefficients, e.g. ModInteger or BigRational.
        Type Parameters:
        C - coefficient type.
        Parameters:
        fac - result polynomial factory.
        A - polynomial with BigInteger coefficients to be converted.
        Returns:
        polynomial with type C coefficients.
      • fromIntegerCoefficients

        public static <C extends RingElem<C>> java.util.List<GenPolynomial<C>> fromIntegerCoefficients​(GenPolynomialRing<C> fac,
                                                                                                       java.util.List<GenPolynomial<BigInteger>> L)
        From BigInteger coefficients. Represent as list of polynomials with type C coefficients, e.g. ModInteger or BigRational.
        Type Parameters:
        C - coefficient type.
        Parameters:
        fac - result polynomial factory.
        L - list of polynomials with BigInteger coefficients to be converted.
        Returns:
        list of polynomials with type C coefficients.
      • conjugateCoeff

        public static <C extends RingElem<C>> GenPolynomial<C> conjugateCoeff​(GenPolynomial<C> A)
        Conjugate coefficients.
        Parameters:
        A - polynomial with StarRingElem coefficients to be conjugated.
        Returns:
        polynomial with conjugate coefficients.
      • convertToRecAlgebraicCoefficients

        public static <C extends GcdRingElem<C>> GenPolynomial<AlgebraicNumber<C>> convertToRecAlgebraicCoefficients​(int depth,
                                                                                                                     GenPolynomialRing<AlgebraicNumber<C>> pfac,
                                                                                                                     GenPolynomial<C> A)
        Convert to recursive AlgebraicNumber coefficients. Represent as polynomial with recursive AlgebraicNumber coefficients, C is e.g. ModInteger or BigRational.
        Parameters:
        depth - recursion depth of AlgebraicNumber coefficients.
        pfac - result polynomial factory.
        A - polynomial with C coefficients to be converted.
        Returns:
        polynomial with AlgebraicNumber<C> coefficients.
      • chineseRemainder

        public static <C extends RingElem<C> & ModularGenPolynomial<C> chineseRemainder​(GenPolynomialRing<C> fac,
                                                                                          GenPolynomial<C> A,
                                                                                          C mi,
                                                                                          GenPolynomial<C> B)
        ModInteger chinese remainder algorithm on coefficients.
        Parameters:
        fac - GenPolynomial<ModInteger> result factory with A.coFac.modul*B.coFac.modul = C.coFac.modul.
        A - GenPolynomial<ModInteger>.
        B - other GenPolynomial<ModInteger>.
        mi - inverse of A.coFac.modul in ring B.coFac.
        Returns:
        S = cra(A,B), with S mod A.coFac.modul == A and S mod B.coFac.modul == B.
      • monic

        public static <C extends RingElem<C>> GenPolynomial<GenPolynomial<C>> monic​(GenPolynomial<GenPolynomial<C>> p)
        GenPolynomial monic, i.e. leadingBaseCoefficient == 1. If leadingBaseCoefficient is not invertible returns this unmodified.
        Type Parameters:
        C - coefficient type.
        Parameters:
        p - recursive GenPolynomial<GenPolynomial>.
        Returns:
        monic(p).
      • monic

        public static <C extends RingElem<C>> java.util.List<GenPolynomial<C>> monic​(java.util.List<GenPolynomial<C>> L)
        Polynomial list monic.
        Type Parameters:
        C - coefficient type.
        Parameters:
        L - list of polynomials with field coefficients.
        Returns:
        list of polynomials with leading coefficient 1.
      • rightMonic

        public static <C extends RingElem<C>> java.util.List<GenPolynomial<C>> rightMonic​(java.util.List<GenPolynomial<C>> L)
        Solvable polynomial list right monic.
        Type Parameters:
        C - coefficient type.
        Parameters:
        L - list of solvable polynomials with field coefficients.
        Returns:
        list of solvable polynomials with leading coefficient 1.
      • wordMonic

        public static <C extends RingElem<C>> java.util.List<GenWordPolynomial<C>> wordMonic​(java.util.List<GenWordPolynomial<C>> L)
        Word polynomial list monic.
        Type Parameters:
        C - coefficient type.
        Parameters:
        L - list of word polynomials with field coefficients.
        Returns:
        list of word polynomials with leading coefficient 1.
      • monicRec

        public static <C extends RingElem<C>> java.util.List<GenPolynomial<GenPolynomial<C>>> monicRec​(java.util.List<GenPolynomial<GenPolynomial<C>>> L)
        Recursive polynomial list monic.
        Type Parameters:
        C - coefficient type.
        Parameters:
        L - list of recursive polynomials with field coefficients.
        Returns:
        list of polynomials with leading base coefficient 1.
      • leadingExpVector

        public static <C extends RingElem<C>> java.util.List<ExpVectorleadingExpVector​(java.util.List<GenPolynomial<C>> L)
        Polynomial list leading exponent vectors.
        Type Parameters:
        C - coefficient type.
        Parameters:
        L - list of polynomials.
        Returns:
        list of leading exponent vectors.
      • toRecursive

        public static <C extends RingElem<C>> GenPolynomial<GenPolynomial<C>> toRecursive​(GenPolynomialRing<GenPolynomial<C>> rfac,
                                                                                          GenPolynomial<C> A)
        To recursive representation. Represent as polynomial in i+r variables with coefficients in i variables. Works for arbitrary term orders.
        Type Parameters:
        C - coefficient type.
        Parameters:
        rfac - recursive polynomial ring factory.
        A - polynomial to be converted.
        Returns:
        Recursive representations of A in the ring rfac.
      • baseRemainderPoly

        public static <C extends RingElem<C>> GenPolynomial<C> baseRemainderPoly​(GenPolynomial<C> P,
                                                                                 C s)
        GenPolynomial coefficient wise remainder.
        Type Parameters:
        C - coefficient type.
        Parameters:
        P - GenPolynomial.
        s - nonzero coefficient.
        Returns:
        coefficient wise remainder.
      • baseSparsePseudoRemainder

        public static <C extends RingElem<C>> GenPolynomial<C> baseSparsePseudoRemainder​(GenPolynomial<C> P,
                                                                                         GenPolynomial<C> S)
        GenPolynomial sparse pseudo remainder. For univariate polynomials.
        Type Parameters:
        C - coefficient type.
        Parameters:
        P - GenPolynomial.
        S - nonzero GenPolynomial.
        Returns:
        remainder with ldcf(S)m' P = quotient * S + remainder. m' ≤ deg(P)-deg(S)
      • baseDensePseudoRemainder

        public static <C extends RingElem<C>> GenPolynomial<C> baseDensePseudoRemainder​(GenPolynomial<C> P,
                                                                                        GenPolynomial<C> S)
        GenPolynomial dense pseudo remainder. For univariate polynomials.
        Parameters:
        P - GenPolynomial.
        S - nonzero GenPolynomial.
        Returns:
        remainder with ldcf(S)m P = quotient * S + remainder. m == deg(P)-deg(S)
      • baseDensePseudoQuotient

        public static <C extends RingElem<C>> GenPolynomial<C> baseDensePseudoQuotient​(GenPolynomial<C> P,
                                                                                       GenPolynomial<C> S)
        GenPolynomial dense pseudo quotient. For univariate polynomials.
        Parameters:
        P - GenPolynomial.
        S - nonzero GenPolynomial.
        Returns:
        quotient with ldcf(S)m P = quotient * S + remainder. m == deg(P)-deg(S)
      • basePseudoDivide

        public static <C extends RingElem<C>> GenPolynomial<C> basePseudoDivide​(GenPolynomial<C> P,
                                                                                GenPolynomial<C> S)
        GenPolynomial sparse pseudo divide. For univariate polynomials or exact division.
        Type Parameters:
        C - coefficient type.
        Parameters:
        P - GenPolynomial.
        S - nonzero GenPolynomial.
        Returns:
        quotient with ldcf(S)m' P = quotient * S + remainder. m' ≤ deg(P)-deg(S)
      • basePseudoQuotientRemainder

        public static <C extends RingElem<C>> GenPolynomial<C>[] basePseudoQuotientRemainder​(GenPolynomial<C> P,
                                                                                             GenPolynomial<C> S)
        GenPolynomial sparse pseudo quotient and remainder. For univariate polynomials or exact division.
        Type Parameters:
        C - coefficient type.
        Parameters:
        P - GenPolynomial.
        S - nonzero GenPolynomial.
        Returns:
        [ quotient, remainder ] with ldcf(S)m' P = quotient * S + remainder. m' ≤ deg(P)-deg(S)
      • coefficientBasePseudoDivide

        public static <C extends RingElem<C>> GenPolynomial<C> coefficientBasePseudoDivide​(GenPolynomial<C> P,
                                                                                           C s)
        GenPolynomial pseudo divide. For polynomials.
        Type Parameters:
        C - coefficient type.
        Parameters:
        P - GenPolynomial.
        s - nonzero coefficient.
        Returns:
        quotient with ldcf(s)m P = quotient * s + remainder.
      • baseDerivative

        public static <C extends RingElem<C>> GenPolynomial<C> baseDerivative​(GenPolynomial<C> P)
        GenPolynomial polynomial derivative main variable.
        Type Parameters:
        C - coefficient type.
        Parameters:
        P - GenPolynomial.
        Returns:
        derivative(P).
      • baseDerivative

        public static <C extends RingElem<C>> GenPolynomial<C> baseDerivative​(GenPolynomial<C> P,
                                                                              int r)
        GenPolynomial polynomial partial derivative variable r.
        Type Parameters:
        C - coefficient type.
        Parameters:
        P - GenPolynomial.
        r - variable for partial deriviate.
        Returns:
        derivative(P,r).
      • baseIntegral

        public static <C extends RingElem<C>> GenPolynomial<C> baseIntegral​(GenPolynomial<C> P)
        GenPolynomial polynomial integral main variable.
        Type Parameters:
        C - coefficient type.
        Parameters:
        P - GenPolynomial.
        Returns:
        integral(P).
      • factorBound

        public static BigInteger factorBound​(ExpVector e)
        Factor coefficient bound. The product of all maxNorms of potential factors is less than or equal to 2**b times the maxNorm of A. Gelfonds bound is used.
        Parameters:
        e - degree vector of a GenPolynomial A.
        Returns:
        2**b.
        See Also:
        "maspoly.SACIPOL.mi#IPFCB from SAC2/MAS"
      • absNorm

        public static <C extends RingElem<C>> C absNorm​(GenPolynomial<C> p)
        Absolute norm. Square root of the sum of the squared coefficients.
        Parameters:
        p - GenPolynomial
        Returns:
        sqrt( sumi |ci|2 ).
      • reciprocalTransformation

        public static <C extends RingElem<C>> GenPolynomial<C> reciprocalTransformation​(GenPolynomial<C> A)
        Polynomial reciprocal transformation.
        Type Parameters:
        C - coefficient type.
        Parameters:
        A - is a non-zero polynomial, with n=DEG(A).
        Returns:
        B with B(x) = x**n*A(1/x), where x is the main variable of A.
        See Also:
        "maspoly.SACPOL.mi#PRT from SAC2/MAS"
      • reciprocalTransformation

        public static <C extends RingElem<C>> GenPolynomial<C> reciprocalTransformation​(GenPolynomial<C> A,
                                                                                        int i)
        Polynomial reciprocal transformation.
        Type Parameters:
        C - coefficient type.
        Parameters:
        A - is a non-zero polynomial, with n=DEG(A,i), A(x_r, ..., x_0).
        i - variable to be transformed, 0 is the main variable.
        Returns:
        B with B(x) = x_i**n*A(1/x_i), where x_i is the i-th variable of A.
        See Also:
        "maspoly.SACPOL.mi#PRT from SAC2/MAS"
      • translationMain

        public static <C extends RingElem<C>> GenPolynomial<C> translationMain​(GenPolynomial<C> A,
                                                                               C h)
        Polynomial translation, main variable.
        Type Parameters:
        C - coefficient type.
        Parameters:
        A - is a non-zero polynomial in r variables, A(x_1, ..., x(r-1), x_r).
        h - is a coefficient ring element.
        Returns:
        B with B(x1, ..., x(r-1), xr) = A(x1, ..., x(r-1), xr+h).
        See Also:
        "maspoly.SACIPOL.mi#IPTRAN from SAC2/MAS"
      • translationMainRecursive

        public static <C extends RingElem<C>> GenPolynomial<GenPolynomial<C>> translationMainRecursive​(GenPolynomial<GenPolynomial<C>> A,
                                                                                                       C h)
        Polynomial translation, main variable.
        Type Parameters:
        C - coefficient type.
        Parameters:
        A - is a non-zero recursive polynomial in r variables, A(x_1, ..., x(r-1))(x_r).
        h - is a coefficient ring element.
        Returns:
        B with B(x1, ..., x(r-1))(xr) = A(x1, ..., x(r-1))(xr+h).
        See Also:
        "maspoly.SACIPOL.mi#IPTRAN from SAC2/MAS"
      • translationBase

        public static <C extends RingElem<C>> GenPolynomial<C> translationBase​(GenPolynomial<C> A,
                                                                               C h)
        Polynomial translation, base univariate.
        Type Parameters:
        C - coefficient type.
        Parameters:
        A - is a non-zero polynomial in 1 variables, A(x_1).
        h - is a coefficient ring element.
        Returns:
        B with B(x1) = A(x1+h1).
        See Also:
        "maspoly.SACIPOL.mi#IPTRAN from SAC2/MAS"
      • translation

        public static <C extends RingElem<C>> GenPolynomial<C> translation​(GenPolynomial<C> A,
                                                                           java.util.List<C> H)
        Polynomial translation, all variables.
        Type Parameters:
        C - coefficient type.
        Parameters:
        A - is a non-zero polynomial in r variables, A(x_1, ..., x(r-1), x_r).
        H - is a list of coefficient ring elements H = (h1, ..., hr).
        Returns:
        B with B(x1, ..., x(r-1), xr) = A(x1+h1, ..., x(r-1)+h(r-1), xr+hr).
        See Also:
        "maspoly.SACIPOL.mi#IPTRAN from SAC2/MAS"
      • translation1

        public static <C extends RingElem<C>> GenPolynomial<C> translation1​(GenPolynomial<C> A,
                                                                            java.util.List<C> H)
        Polynomial translation, r-1 variables.
        Type Parameters:
        C - coefficient type.
        Parameters:
        A - is a non-zero polynomial in r variables, A(x_1, ..., x(r-1), x_r).
        H - is a list of coefficient ring elements H = (h2, ..., hr).
        Returns:
        B with B(x1, ..., x(r-1), xr) = A(x1, x2+h2, ..., x(r-1)+h(r-1), xr+hr).
        See Also:
        "maspoly.SACIPOL.mi#IPTRAN from SAC2/MAS"
      • evaluateMain

        public static <C extends RingElem<C>> GenPolynomial<C> evaluateMain​(GenPolynomialRing<C> cfac,
                                                                            GenPolynomial<C> A,
                                                                            C a)
        Evaluate at main variable.
        Type Parameters:
        C - coefficient type.
        Parameters:
        cfac - coefficient polynomial ring factory.
        A - distributed polynomial to be evaluated.
        a - value to evaluate at.
        Returns:
        A( x_1, ..., x_{n-1}, a ).
      • evaluateMain

        public static <C extends RingElem<C>> java.util.List<GenPolynomial<C>> evaluateMain​(GenPolynomialRing<C> cfac,
                                                                                            java.util.List<GenPolynomial<C>> L,
                                                                                            C a)
        Evaluate at main variable.
        Type Parameters:
        C - coefficient type.
        Parameters:
        cfac - coefficient ring factory.
        L - list of univariate polynomials to be evaluated.
        a - value to evaluate at.
        Returns:
        list( A( x_1, ..., x_{n-1}, a ) ) for A in L.
      • evaluateMain

        public static <C extends RingElem<C>> C evaluateMain​(RingFactory<C> cfac,
                                                             GenPolynomial<C> A,
                                                             C a)
        Evaluate at main variable.
        Type Parameters:
        C - coefficient type.
        Parameters:
        cfac - coefficient ring factory.
        A - univariate polynomial to be evaluated.
        a - value to evaluate at.
        Returns:
        A( a ).
      • evaluateMain

        public static <C extends RingElem<C>> java.util.List<C> evaluateMain​(RingFactory<C> cfac,
                                                                             java.util.List<GenPolynomial<C>> L,
                                                                             C a)
        Evaluate at main variable.
        Type Parameters:
        C - coefficient type.
        Parameters:
        cfac - coefficient ring factory.
        L - list of univariate polynomial to be evaluated.
        a - value to evaluate at.
        Returns:
        list( A( a ) ) for A in L.
      • evaluate

        public static <C extends RingElem<C>> GenPolynomial<C> evaluate​(GenPolynomialRing<C> cfac,
                                                                        GenPolynomialRing<GenPolynomial<C>> rfac,
                                                                        GenPolynomialRing<GenPolynomial<C>> nfac,
                                                                        GenPolynomialRing<C> dfac,
                                                                        GenPolynomial<C> A,
                                                                        C a)
        Evaluate at k-th variable.
        Type Parameters:
        C - coefficient type.
        Parameters:
        cfac - coefficient polynomial ring in k variables C[x_1, ..., x_k] factory.
        rfac - coefficient polynomial ring C[x_1, ..., x_{k-1}] [x_k] factory, a recursive polynomial ring in 1 variable with coefficients in k-1 variables.
        nfac - polynomial ring in n-1 variables C[x_1, ..., x_{k-1}] [x_{k+1}, ..., x_n] factory, a recursive polynomial ring in n-k+1 variables with coefficients in k-1 variables.
        dfac - polynomial ring in n-1 variables. C[x_1, ..., x_{k-1}, x_{k+1}, ..., x_n] factory.
        A - polynomial to be evaluated.
        a - value to evaluate at.
        Returns:
        A( x_1, ..., x_{k-1}, a, x_{k+1}, ..., x_n).
      • evaluateFirst

        public static <C extends RingElem<C>> GenPolynomial<C> evaluateFirst​(GenPolynomialRing<C> cfac,
                                                                             GenPolynomialRing<C> dfac,
                                                                             GenPolynomial<C> A,
                                                                             C a)
        Evaluate at first (lowest) variable.
        Type Parameters:
        C - coefficient type.
        Parameters:
        cfac - coefficient polynomial ring in first variable C[x_1] factory.
        dfac - polynomial ring in n-1 variables. C[x_2, ..., x_n] factory.
        A - polynomial to be evaluated.
        a - value to evaluate at.
        Returns:
        A( a, x_2, ..., x_n).
      • evaluateFirstRec

        public static <C extends RingElem<C>> GenPolynomial<C> evaluateFirstRec​(GenPolynomialRing<C> cfac,
                                                                                GenPolynomialRing<C> dfac,
                                                                                GenPolynomial<GenPolynomial<C>> A,
                                                                                C a)
        Evaluate at first (lowest) variable. Could also be called evaluateFirst(), but type erasure of parameter A does not allow the same name.
        Type Parameters:
        C - coefficient type.
        Parameters:
        cfac - coefficient polynomial ring in first variable C[x_1] factory.
        dfac - polynomial ring in n-1 variables. C[x_2, ..., x_n] factory.
        A - recursive polynomial to be evaluated.
        a - value to evaluate at.
        Returns:
        A( a, x_2, ..., x_n).
      • evaluateAll

        public static <C extends RingElem<C>> java.util.List<C> evaluateAll​(RingFactory<C> cfac,
                                                                            java.util.List<GenPolynomial<C>> L,
                                                                            java.util.List<C> a)
        Evaluate all variables.
        Type Parameters:
        C - coefficient type.
        Parameters:
        cfac - coefficient ring factory.
        L - list of polynomials to be evaluated.
        a - = (a_1, a_2, ..., a_n) a tuple of values to evaluate at.
        Returns:
        L = ( A_1(a_1, a_2, ..., a_n), ... A_k(a_1, a_2, ..., a_n)).
      • evaluateAll

        public static <C extends RingElem<C>> C evaluateAll​(RingFactory<C> cfac,
                                                            GenPolynomial<C> A,
                                                            java.util.List<C> a)
        Evaluate all variables.
        Type Parameters:
        C - coefficient type.
        Parameters:
        cfac - coefficient ring factory.
        A - polynomial to be evaluated.
        a - = (a_1, a_2, ..., a_n) a tuple of values to evaluate at.
        Returns:
        A(a_1, a_2, ..., a_n).
      • seriesOfTaylor

        public static <C extends RingElem<C>> GenPolynomial<C> seriesOfTaylor​(GenPolynomial<C> f,
                                                                              C a)
        Taylor series for polynomial.
        Parameters:
        f - univariate polynomial.
        a - expansion point.
        Returns:
        Taylor series (a polynomial) of f at a.
      • interpolate

        public static <C extends RingElem<C>> GenPolynomial<C> interpolate​(GenPolynomialRing<C> fac,
                                                                           GenPolynomial<C> A,
                                                                           GenPolynomial<C> M,
                                                                           C mi,
                                                                           C a,
                                                                           C am)
        Univariate polynomial interpolation.
        Type Parameters:
        C - coefficient type.
        Parameters:
        fac - GenPolynomial result factory.
        A - GenPolynomial.
        M - GenPolynomial interpolation modul of A.
        mi - inverse of M(am) in ring fac.coFac.
        a - evaluation of other GenPolynomial.
        am - evaluation point (interpolation modul) of a, i.e. P(am) = a.
        Returns:
        S, with S mod M == A and S(am) == a.
      • totalDegreeLeadingTerm

        public static <C extends RingElem<C>> long totalDegreeLeadingTerm​(java.util.List<GenPolynomial<C>> P)
        Maximal degree of leading terms of a polynomial list.
        Returns:
        maximum degree of the leading terms of a polynomial list.
      • totalDegree

        public static <C extends RingElem<C>> long totalDegree​(java.util.List<GenPolynomial<C>> P)
        Total degree of polynomial list.
        Returns:
        total degree of the polynomial list.
      • maxDegree

        public static <C extends RingElem<C>> long maxDegree​(java.util.List<GenPolynomial<C>> P)
        Maximal degree of polynomial list.
        Returns:
        maximal degree of the polynomial list.
      • coeffMaxDegree

        public static <C extends RingElem<C>> long coeffMaxDegree​(GenPolynomial<GenPolynomial<C>> A)
        Maximal degree in the coefficient polynomials.
        Type Parameters:
        C - coefficient type.
        Returns:
        maximal degree in the coefficients.
      • toProductGen

        public static <C extends GcdRingElem<C>> java.util.List<GenPolynomial<Product<C>>> toProductGen​(GenPolynomialRing<Product<C>> pfac,
                                                                                                        java.util.List<GenPolynomial<C>> L)
        Product representation.
        Type Parameters:
        C - coefficient type.
        Parameters:
        pfac - polynomial ring factory.
        L - list of polynomials to be represented.
        Returns:
        Product representation of L in the polynomial ring pfac.
      • toProductGen

        public static <C extends GcdRingElem<C>> Product<C> toProductGen​(ProductRing<C> pfac,
                                                                         C c)
        Product representation.
        Type Parameters:
        C - coefficient type.
        Parameters:
        pfac - product ring factory.
        c - coefficient to be represented.
        Returns:
        Product representation of c in the ring pfac.
      • toProduct

        public static <C extends RingElem<C>> Product<GenPolynomial<C>> toProduct​(ProductRing<GenPolynomial<C>> pfac,
                                                                                  C c,
                                                                                  ExpVector e)
        Product representation.
        Type Parameters:
        C - coefficient type.
        Parameters:
        pfac - product polynomial ring factory.
        c - coefficient to be used.
        e - exponent vector.
        Returns:
        Product representation of c X^e in the ring pfac.
      • intersect

        public static <C extends RingElem<C>> java.util.List<GenPolynomial<C>> intersect​(GenPolynomialRing<C> R,
                                                                                         java.util.List<GenPolynomial<C>> F)
        Intersection. Intersection of a list of polynomials with a polynomial ring. The polynomial ring must be a contraction of the polynomial ring of the list of polynomials and the TermOrder must be an elimination order.
        Parameters:
        R - polynomial ring
        F - list of polynomials
        Returns:
        R \cap F
      • intersect

        public static <C extends RingElem<C>> java.util.List<GenSolvablePolynomial<C>> intersect​(GenSolvablePolynomialRing<C> R,
                                                                                                 java.util.List<GenSolvablePolynomial<C>> F)
        Intersection. Intersection of a list of solvable polynomials with a solvable polynomial ring. The solvable polynomial ring must be a contraction of the solvable polynomial ring of the list of polynomials and the TermOrder must be an elimination order.
        Parameters:
        R - solvable polynomial ring
        F - list of solvable polynomials
        Returns:
        R \cap F
      • intersect

        public static <C extends RingElem<C>> java.util.List<GenWordPolynomial<C>> intersect​(GenWordPolynomialRing<C> R,
                                                                                             java.util.List<GenWordPolynomial<C>> F)
        Intersection. Intersection of a list of word polynomials with a word polynomial ring. The polynomial ring must be a contraction of the polynomial ring of the list of polynomials,
        Parameters:
        R - word polynomial ring
        F - list of word polynomials
        Returns:
        R \cap F
      • selectWithVariable

        public static <C extends RingElem<C>> GenPolynomial<C> selectWithVariable​(java.util.List<GenPolynomial<C>> P,
                                                                                  int i)
        Select polynomial with univariate leading term in variable i.
        Parameters:
        i - variable index.
        Returns:
        polynomial with head term in variable i