GenPolynomialRing
edu.jas.poly

Class GenPolynomialRing<C extends RingElem<C>>

    • Field Detail

      • nvar

        public final int nvar
        The number of variables.
      • tord

        public final TermOrder tord
        The term order.
      • evzero

        public final ExpVector evzero
        The constant exponent vector 0 for this ring.
    • Constructor Detail

      • GenPolynomialRing

        public GenPolynomialRing(RingFactory<C> cf,                 int n)
        The constructor creates a polynomial factory object with the default term order.
        Parameters:
        cf - factory for coefficients of type C.
        n - number of variables.
      • GenPolynomialRing

        public GenPolynomialRing(RingFactory<C> cf,                 int n,                 TermOrder t)
        The constructor creates a polynomial factory object.
        Parameters:
        cf - factory for coefficients of type C.
        n - number of variables.
        t - a term order.
      • GenPolynomialRing

        public GenPolynomialRing(RingFactory<C> cf,                 String[] v)
        The constructor creates a polynomial factory object.
        Parameters:
        cf - factory for coefficients of type C.
        v - names for the variables.
      • GenPolynomialRing

        public GenPolynomialRing(RingFactory<C> cf,                 int n,                 String[] v)
        The constructor creates a polynomial factory object.
        Parameters:
        cf - factory for coefficients of type C.
        n - number of variables.
        v - names for the variables.
      • GenPolynomialRing

        public GenPolynomialRing(RingFactory<C> cf,                 TermOrder t,                 String[] v)
        The constructor creates a polynomial factory object.
        Parameters:
        cf - factory for coefficients of type C.
        t - a term order.
        v - names for the variables.
      • GenPolynomialRing

        public GenPolynomialRing(RingFactory<C> cf,                 String[] v,                 TermOrder t)
        The constructor creates a polynomial factory object.
        Parameters:
        cf - factory for coefficients of type C.
        v - names for the variables.
        t - a term order.
      • GenPolynomialRing

        public GenPolynomialRing(RingFactory<C> cf,                 int n,                 TermOrder t,                 String[] v)
        The constructor creates a polynomial factory object.
        Parameters:
        cf - factory for coefficients of type C.
        n - number of variables.
        t - a term order.
        v - names for the variables.
      • GenPolynomialRing

        public GenPolynomialRing(RingFactory<C> cf,                 GenPolynomialRing o)
        The constructor creates a polynomial factory object with the the same term order, number of variables and variable names as the given polynomial factory, only the coefficient factories differ.
        Parameters:
        cf - factory for coefficients of type C.
        o - other polynomial ring.
      • GenPolynomialRing

        public GenPolynomialRing(GenPolynomialRing<C> o,                 TermOrder to)
        The constructor creates a polynomial factory object with the the same coefficient factory, number of variables and variable names as the given polynomial factory, only the term order differs.
        Parameters:
        to - term order.
        o - other polynomial ring.
    • Method Detail

      • getVars

        public String[] getVars()
        Get the variable names.
        Returns:
        vars.
      • setVars

        public String[] setVars(String[] v)
        Set the variable names.
        Returns:
        old vars.
      • varsToString

        public String varsToString()
        Get a String representation of the variable names.
        Returns:
        names seperated by commas.
      • getZEROCoefficient

        public C getZEROCoefficient()
        Get the zero element from the coefficients.
        Returns:
        0 as C.
      • getONECoefficient

        public C getONECoefficient()
        Get the one element from the coefficients.
        Returns:
        1 as C.
      • valueOf

        public GenPolynomial<C> valueOf(C a)
        Get a (constant) GenPolynomial<C> element from a coefficient value.
        Parameters:
        a - coefficient.
        Returns:
        a GenPolynomial<C>.
      • valueOf

        public GenPolynomial<C> valueOf(ExpVector e)
        Get a GenPolynomial<C> element from an exponent vector.
        Parameters:
        e - exponent vector.
        Returns:
        a GenPolynomial<C>.
      • valueOf

        public GenPolynomial<C> valueOf(C a,                       ExpVector e)
        Get a GenPolynomial<C> element from a coeffcient and an exponent vector.
        Parameters:
        a - coefficient.
        e - exponent vector.
        Returns:
        a GenPolynomial<C>.
      • random

        public GenPolynomial<C> random(int n)
        Random polynomial. Generates a random polynomial with k = 5, l = n, d = (nvar == 1) ? n : 3, q = (nvar == 1) ? 0.7 : 0.3.
        Specified by:
        random in interface ElemFactory<GenPolynomial<C extends RingElem<C>>>
        Parameters:
        n - number of terms.
        Returns:
        a random polynomial.
      • random

        public GenPolynomial<C> random(int n,                      Random rnd)
        Random polynomial. Generates a random polynomial with k = 5, l = n, d = (nvar == 1) ? n : 3, q = (nvar == 1) ? 0.7 : 0.3.
        Specified by:
        random in interface ElemFactory<GenPolynomial<C extends RingElem<C>>>
        Parameters:
        n - number of terms.
        rnd - is a source for random bits.
        Returns:
        a random polynomial.
      • random

        public GenPolynomial<C> random(int k,                      int l,                      int d,                      float q)
        Generate a random polynomial.
        Parameters:
        k - bitsize of random coefficients.
        l - number of terms.
        d - maximal degree in each variable.
        q - density of nozero exponents.
        Returns:
        a random polynomial.
      • random

        public GenPolynomial<C> random(int k,                      int l,                      int d,                      float q,                      Random rnd)
        Generate a random polynomial.
        Parameters:
        k - bitsize of random coefficients.
        l - number of terms.
        d - maximal degree in each variable.
        q - density of nozero exponents.
        rnd - is a source for random bits.
        Returns:
        a random polynomial.
      • univariate

        public GenPolynomial<C> univariate(int i)
        Generate univariate polynomial in a given variable.
        Parameters:
        i - the index of the variable.
        Returns:
        X_i as univariate polynomial.
      • univariate

        public GenPolynomial<C> univariate(int i,                          long e)
        Generate univariate polynomial in a given variable with given exponent.
        Parameters:
        i - the index of the variable.
        e - the exponent of the variable.
        Returns:
        X_i^e as univariate polynomial.
      • univariate

        public GenPolynomial<C> univariate(int modv,                          int i,                          long e)
        Generate univariate polynomial in a given variable with given exponent.
        Parameters:
        modv - number of module variables.
        i - the index of the variable.
        e - the exponent of the variable.
        Returns:
        X_i^e as univariate polynomial.
      • getGenerators

        public List<GenPolynomial<C>> getGenerators()
        Get the generating elements excluding the generators for the coefficient ring.
        Returns:
        a list of generating elements for this ring.
      • univariateList

        public List<? extends GenPolynomial<C>> univariateList()
        Generate list of univariate polynomials in all variables.
        Returns:
        List(X_1,...,X_n) a list of univariate polynomials.
      • univariateList

        public List<? extends GenPolynomial<C>> univariateList(int modv)
        Generate list of univariate polynomials in all variables.
        Parameters:
        modv - number of module variables.
        Returns:
        List(X_1,...,X_n) a list of univariate polynomials.
      • univariateList

        public List<? extends GenPolynomial<C>> univariateList(int modv,                                              long e)
        Generate list of univariate polynomials in all variables with given exponent.
        Parameters:
        modv - number of module variables.
        e - the exponent of the variables.
        Returns:
        List(X_1^e,...,X_n^e) a list of univariate polynomials.
      • extend

        public GenPolynomialRing<C> extend(int i)
        Extend variables. Used e.g. in module embedding. Extend number of variables by i.
        Parameters:
        i - number of variables to extend.
        Returns:
        extended polynomial ring factory.
      • extend

        public GenPolynomialRing<C> extend(String[] vn)
        Extend variables. Used e.g. in module embedding. Extend number of variables by length(vn).
        Parameters:
        vn - names for extended variables.
        Returns:
        extended polynomial ring factory.
      • extendLower

        public GenPolynomialRing<C> extendLower(int i)
        Extend lower variables. Extend number of variables by i.
        Parameters:
        i - number of variables to extend.
        Returns:
        extended polynomial ring factory.
      • extendLower

        public GenPolynomialRing<C> extendLower(String[] vn)
        Extend lower variables. Extend number of variables by length(vn).
        Parameters:
        vn - names for extended lower variables.
        Returns:
        extended polynomial ring factory.
      • contract

        public GenPolynomialRing<C> contract(int i)
        Contract variables. Used e.g. in module embedding. Contract number of variables by i.
        Parameters:
        i - number of variables to remove.
        Returns:
        contracted polynomial ring factory.
      • recursive

        public GenPolynomialRing<GenPolynomial<C>> recursive(int i)
        Recursive representation as polynomial with i main variables.
        Parameters:
        i - number of main variables.
        Returns:
        recursive polynomial ring factory.
      • distribute

        public GenPolynomialRing<C> distribute()
        Distributive representation as polynomial with all main variables.
        Returns:
        distributive polynomial ring factory.
      • reverse

        public GenPolynomialRing<C> reverse()
        Reverse variables. Used e.g. in opposite rings.
        Returns:
        polynomial ring factory with reversed variables.
      • reverse

        public GenPolynomialRing<C> reverse(boolean partial)
        Reverse variables. Used e.g. in opposite rings.
        Parameters:
        partial - true for partialy reversed term orders.
        Returns:
        polynomial ring factory with reversed variables.
      • getComparator

        public PolynomialComparator<C> getComparator()
        Get PolynomialComparator.
        Returns:
        polynomial comparator.
      • getComparator

        public PolynomialComparator<C> getComparator(boolean rev)
        Get PolynomialComparator.
        Parameters:
        rev - for reverse comparator.
        Returns:
        polynomial comparator.
      • newVars

        public static String[] newVars(String prefix,               int n)
        New variable names. Generate new names for variables,
        Parameters:
        prefix - name prefix.
        n - number of variables.
        Returns:
        new variable names.
      • newVars

        public String[] newVars(String prefix)
        New variable names. Generate new names for variables,
        Parameters:
        prefix - name prefix.
        Returns:
        new variable names.
      • newVars

        public static String[] newVars(int n)
        New variable names. Generate new names for variables,
        Parameters:
        n - number of variables.
        Returns:
        new variable names.
      • newVars

        public String[] newVars()
        New variable names. Generate new names for variables,
        Returns:
        new variable names.
      • addVars

        public static void addVars(String[] vars)
        Add variable names.
        Parameters:
        vars - variable names to be recorded.

SCaVis 2.2 © jWork.ORG