PolyUtil
edu.jas.poly

Class PolyUtil



  • public class PolyUtilextends Object
    Polynomial utilities, for example conversion between different representations, evaluation and interpolation.
    • Constructor Detail

      • PolyUtil

        public PolyUtil()
    • 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 represenations 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>> List<GenPolynomial<GenPolynomial<C>>> recursive(GenPolynomialRing<GenPolynomial<C>> rfac,                                                                      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 represenations of the list in the ring rfac.
      • distribute

        public static <C extends RingElem<C>> List<GenPolynomial<C>> distribute(GenPolynomialRing<C> dfac,                                                        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> & ModularGenPolynomial<BigInteger> integerFromModularCoefficients(GenPolynomialRing<BigInteger> fac,                                                                                        GenPolynomial<C> A)
        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.
        A - polynomial with ModInteger coefficients to be converted.
        Returns:
        polynomial with BigInteger coefficients.
      • integerFromModularCoefficients

        public static <C extends RingElem<C> & ModularList<GenPolynomial<BigInteger>> integerFromModularCoefficients(GenPolynomialRing<BigInteger> fac,                                                                                              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.
      • integerFromModularCoefficientsPositive

        public static <C extends RingElem<C> & ModularGenPolynomial<BigInteger> integerFromModularCoefficientsPositive(GenPolynomialRing<BigInteger> fac,                                                                                                GenPolynomial<C> A)
        BigInteger from ModInteger coefficients, positive. Represent as polynomial with BigInteger coefficients by removing the modules.
        Parameters:
        fac - result polynomial factory.
        A - polynomial with ModInteger coefficients to be converted.
        Returns:
        polynomial with BigInteger coefficients.
      • integerFromRationalCoefficients

        public static GenPolynomial<BigInteger> integerFromRationalCoefficients(GenPolynomialRing<BigInteger> fac,                                                        GenPolynomial<BigRational> A)
        BigInteger from BigRational coefficients. Represent as polynomial with BigInteger coefficients by multiplication with the lcm of the numerators of the BigRational coefficients.
        Parameters:
        fac - result polynomial factory.
        A - polynomial with BigRational coefficients to be converted.
        Returns:
        polynomial with BigInteger coefficients.
      • integerFromRationalCoefficientsFactor

        public static 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 List<GenPolynomial<BigInteger>> integerFromRationalCoefficients(GenPolynomialRing<BigInteger> fac,                                                              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>> List<GenPolynomial<C>> fromIntegerCoefficients(GenPolynomialRing<C> fac,                                                                     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.
      • realPartFromComplex

        public static <C extends RingElem<C>> GenPolynomial<C> realPartFromComplex(GenPolynomialRing<C> fac,                                                           GenPolynomial<Complex<C>> A)
        Real part.
        Parameters:
        fac - result polynomial factory.
        A - polynomial with BigComplex coefficients to be converted.
        Returns:
        polynomial with real part of the coefficients.
      • imaginaryPartFromComplex

        public static <C extends RingElem<C>> GenPolynomial<C> imaginaryPartFromComplex(GenPolynomialRing<C> fac,                                                                GenPolynomial<Complex<C>> A)
        Imaginary part.
        Parameters:
        fac - result polynomial factory.
        A - polynomial with BigComplex coefficients to be converted.
        Returns:
        polynomial with imaginary part of coefficients.
      • complexFromAny

        public static <C extends GcdRingElem<C>> GenPolynomial<Complex<C>> complexFromAny(GenPolynomialRing<Complex<C>> fac,                                                                  GenPolynomial<C> A)
        Complex from ring element coefficients.
        Parameters:
        fac - result polynomial factory.
        A - polynomial with RingElem coefficients to be converted.
        Returns:
        polynomial with Complex coefficients.
      • fromAlgebraicCoefficients

        public static <C extends GcdRingElem<C>> GenPolynomial<GenPolynomial<C>> fromAlgebraicCoefficients(GenPolynomialRing<GenPolynomial<C>> rfac,                                                                                   GenPolynomial<AlgebraicNumber<C>> A)
        From AlgebraicNumber coefficients. Represent as polynomial with type GenPolynomial<C> coefficients, e.g. ModInteger or BigRational.
        Parameters:
        rfac - result polynomial factory.
        A - polynomial with AlgebraicNumber coefficients to be converted.
        Returns:
        polynomial with type GenPolynomial<C> coefficients.
      • convertToAlgebraicCoefficients

        public static <C extends GcdRingElem<C>> GenPolynomial<AlgebraicNumber<C>> convertToAlgebraicCoefficients(GenPolynomialRing<AlgebraicNumber<C>> pfac,                                                                                          GenPolynomial<C> A)
        Convert to AlgebraicNumber coefficients. Represent as polynomial with AlgebraicNumber coefficients, C is e.g. ModInteger or BigRational.
        Parameters:
        pfac - result polynomial factory.
        A - polynomial with C coefficients to be converted.
        Returns:
        polynomial with AlgebraicNumber<C> 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.
      • convertRecursiveToAlgebraicCoefficients

        public static <C extends GcdRingElem<C>> GenPolynomial<AlgebraicNumber<C>> convertRecursiveToAlgebraicCoefficients(GenPolynomialRing<AlgebraicNumber<C>> pfac,                                                                                                   GenPolynomial<GenPolynomial<C>> A)
        Convert to AlgebraicNumber coefficients. Represent as polynomial with AlgebraicNumber coefficients, C is e.g. ModInteger or BigRational.
        Parameters:
        pfac - result polynomial factory.
        A - recursive polynomial with GenPolynomial<BigInteger> 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>.
        Returns:
        monic(p).
      • monic

        public static <C extends RingElem<C>> List<GenPolynomial<C>> monic(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.
      • leadingExpVector

        public static <C extends RingElem<C>> List<ExpVector> leadingExpVector(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.
      • extendCoefficients

        public static <C extends RingElem<C>> GenPolynomial<GenPolynomial<C>> extendCoefficients(GenPolynomialRing<GenPolynomial<C>> pfac,                                                                         GenPolynomial<GenPolynomial<C>> A,                                                                         int j,                                                                         long k)
        Extend coefficient variables. Extend all coefficient ExpVectors by i elements and multiply by x_j^k.
        Parameters:
        pfac - extended polynomial ring factory (by i variables in the coefficients).
        j - index of variable to be used for multiplication.
        k - exponent for x_j.
        Returns:
        extended polynomial.
      • 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 represenations of A in the ring rfac.
      • toRecursive

        public static <C extends RingElem<C>> GenSolvablePolynomial<GenPolynomial<C>> toRecursive(GenSolvablePolynomialRing<GenPolynomial<C>> rfac,                                                                          GenSolvablePolynomial<C> A)
        To recursive representation. Represent as solvable polynomial in i+r variables with coefficients in i variables. Works for arbitrary term orders.
        Type Parameters:
        C - coefficient type.
        Parameters:
        rfac - recursive solvable polynomial ring factory.
        A - solvable polynomial to be converted.
        Returns:
        Recursive represenations of A in the ring rfac.
      • 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)
        See Also:
        GenPolynomial.divide(edu.jas.poly.GenPolynomial).
      • baseRecursiveDivide

        public static <C extends RingElem<C>> GenPolynomial<GenPolynomial<C>> baseRecursiveDivide(GenPolynomial<GenPolynomial<C>> P,                                                                          C s)
        GenPolynomial base divide. For recursive polynomials. Division by coefficient ring element.
        Type Parameters:
        C - coefficient type.
        Parameters:
        P - recursive GenPolynomial.
        s - coefficient.
        Returns:
        this/s.
      • baseDeriviative

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

        public static <C extends RingElem<C>> GenPolynomial<C> baseDeriviative(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:
        deriviative(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).
      • recursiveDeriviative

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

        public static BigInteger factorBound(ExpVector e)
        Factor coefficient bound. See SACIPOL.IPFCB: the product of all maxNorms of potential factors is less than or equal to 2**b times the maxNorm of A.
        Parameters:
        e - degree vector of a GenPolynomial A.
        Returns:
        2**b.
      • evaluateMainRecursive

        public static <C extends RingElem<C>> GenPolynomial<C> evaluateMainRecursive(GenPolynomialRing<C> cfac,                                                             GenPolynomial<GenPolynomial<C>> A,                                                             C a)
        Evaluate at main variable.
        Type Parameters:
        C - coefficient type.
        Parameters:
        cfac - coefficent polynomial ring factory.
        A - recursive polynomial to be evaluated.
        a - value to evaluate at.
        Returns:
        A( x_1, ..., x_{n-1}, a ).
      • 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 - coefficent 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>> List<GenPolynomial<C>> evaluateMain(GenPolynomialRing<C> cfac,                                                          List<GenPolynomial<C>> L,                                                          C a)
        Evaluate at main variable.
        Type Parameters:
        C - coefficient type.
        Parameters:
        cfac - coefficent 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 - coefficent ring factory.
        A - univariate polynomial to be evaluated.
        a - value to evaluate at.
        Returns:
        A( a ).
      • evaluateMain

        public static <C extends RingElem<C>> List<C> evaluateMain(RingFactory<C> cfac,                                           List<GenPolynomial<C>> L,                                           C a)
        Evaluate at main variable.
        Type Parameters:
        C - coefficient type.
        Parameters:
        cfac - coefficent 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 varaibles 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.
        Type Parameters:
        C - coefficient type. Could also be called evaluateFirst(), but type erasure of A parameter does not allow same name.
        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

        @Deprecatedpublic static <C extends RingElem<C>> C evaluateAll(RingFactory<C> cfac,                                               GenPolynomialRing<C> dfac,                                               GenPolynomial<C> A,                                               List<C> a)
        Deprecated. use evaluateAll() with three arguments
        Evaluate all variables.
        Type Parameters:
        C - coefficient type.
        Parameters:
        cfac - coefficient ring factory.
        dfac - polynomial ring in n variables. C[x_1, x_2, ..., x_n] 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).
      • evaluateAll

        public static <C extends RingElem<C>> C evaluateAll(RingFactory<C> cfac,                                    GenPolynomial<C> A,                                    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).
      • substituteMain

        public static <C extends RingElem<C>> GenPolynomial<C> substituteMain(GenPolynomial<C> A,                                                      GenPolynomial<C> s)
        Substitute main variable.
        Parameters:
        A - univariate polynomial.
        s - polynomial for substitution.
        Returns:
        polynomial A(x <- s).
      • substituteUnivariate

        public static <C extends RingElem<C>> GenPolynomial<C> substituteUnivariate(GenPolynomial<C> f,                                                            GenPolynomial<C> t)
        Substitute univariate polynomial.
        Parameters:
        f - univariate polynomial.
        t - polynomial for substitution.
        Returns:
        polynomial A(x <- t).
      • 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<GenPolynomial<C>> interpolate(GenPolynomialRing<GenPolynomial<C>> fac,                                                                  GenPolynomial<GenPolynomial<C>> A,                                                                  GenPolynomial<C> M,                                                                  C mi,                                                                  GenPolynomial<C> B,                                                                  C am)
        ModInteger interpolate on first variable.
        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.
        B - evaluation of other GenPolynomial.
        am - evaluation point (interpolation modul) of B, i.e. P(am) = B.
        Returns:
        S, with S mod M == A and S(am) == B.
      • 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(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(List<GenPolynomial<C>> P)
        Maximal degree of polynomial list.
        Returns:
        maximum 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>> GenPolynomial<Product<C>> toProductGen(GenPolynomialRing<Product<C>> pfac,                                                                GenPolynomial<C> A)
        Product representation.
        Type Parameters:
        C - coefficient type.
        Parameters:
        pfac - polynomial ring factory.
        A - polynomial to be represented.
        Returns:
        Product represenation of A 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 represenation 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 represenation of c X^e in the ring pfac.
      • toProduct

        public static <C extends RingElem<C>> Product<GenPolynomial<C>> toProduct(ProductRing<GenPolynomial<C>> pfac,                                                          GenPolynomial<C> A)
        Product representation.
        Type Parameters:
        C - coefficient type.
        Parameters:
        pfac - product polynomial ring factory.
        A - polynomial.
        Returns:
        Product represenation of the terms of A in the ring pfac.
      • toProduct

        public static Product<ModInteger> toProduct(ProductRing<ModInteger> pfac,                            BigInteger c)
        Product representation.
        Parameters:
        pfac - product ring factory.
        c - coefficient to be represented.
        Returns:
        Product represenation of c in the ring pfac.
      • intersect

        public static <C extends RingElem<C>> List<GenPolynomial<C>> intersect(GenPolynomialRing<C> R,                                                       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>> List<GenSolvablePolynomial<C>> intersect(GenSolvablePolynomialRing<C> R,                                                               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
      • removeUnusedUpperVariables

        public static <C extends RingElem<C>> GenPolynomial<C> removeUnusedUpperVariables(GenPolynomial<C> p)
        Remove all upper variables which do not occur in polynomial.
        Parameters:
        p - polynomial.
        Returns:
        polynomial with removed variables
      • removeUnusedLowerVariables

        public static <C extends RingElem<C>> GenPolynomial<C> removeUnusedLowerVariables(GenPolynomial<C> p)
        Remove all lower variables which do not occur in polynomial.
        Parameters:
        p - polynomial.
        Returns:
        polynomial with removed variables
      • removeUnusedMiddleVariables

        public static <C extends RingElem<C>> GenPolynomial<C> removeUnusedMiddleVariables(GenPolynomial<C> p)
        Remove upper block of middle variables which do not occur in polynomial.
        Parameters:
        p - polynomial.
        Returns:
        polynomial with removed variables
      • selectWithVariable

        public static <C extends RingElem<C>> GenPolynomial<C> selectWithVariable(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

SCaVis 2.0 © jWork.ORG