Class RandomMultivariatePolynomials


  • public final class RandomMultivariatePolynomials
    extends Object
    Methods to generate random multivariate polynomials.
    Since:
    1.0
    • Method Detail

      • randomPolynomial

        public static MultivariatePolynomial<BigInteger> randomPolynomial​(int nVars,
                                                                          int degree,
                                                                          int size,
                                                                          BigInteger bound,
                                                                          Comparator<DegreeVector> ordering,
                                                                          org.apache.commons.math3.random.RandomGenerator rnd)
        Generates random Z[X] polynomial with coefficients bounded by bound
        Parameters:
        nVars - number of variables
        degree - maximal degree of the result
        size - number of elements in the result
        bound - coefficient bound
        ordering - monomial order
        rnd - random source
        Returns:
        random Z[X] polynomial
      • randomPolynomial

        public static MultivariatePolynomial<BigInteger> randomPolynomial​(int nVars,
                                                                          int degree,
                                                                          int size,
                                                                          org.apache.commons.math3.random.RandomGenerator rnd)
        Generates random Z[X] polynomial
        Parameters:
        nVars - number of variables
        degree - maximal degree of the result
        size - number of elements in the result
        rnd - random source
        Returns:
        random polynomial
      • randomPolynomial

        public static <E> MultivariatePolynomial<E> randomPolynomial​(int nVars,
                                                                     int degree,
                                                                     int size,
                                                                     Ring<E> ring,
                                                                     Comparator<DegreeVector> ordering,
                                                                     Function<org.apache.commons.math3.random.RandomGenerator,​E> method,
                                                                     org.apache.commons.math3.random.RandomGenerator rnd)
        Generates random polynomial
        Parameters:
        nVars - number of variables
        degree - maximal degree of the result
        size - number of elements in the result
        ring - the coefficient ring
        ordering - monomial order
        method - method for generating random coefficients
        rnd - random source
        Returns:
        random polynomial
      • randomPolynomial

        public static <E> MultivariatePolynomial<E> randomPolynomial​(int nVars,
                                                                     int minDegree,
                                                                     int maxDegree,
                                                                     int size,
                                                                     Ring<E> ring,
                                                                     Comparator<DegreeVector> ordering,
                                                                     Function<org.apache.commons.math3.random.RandomGenerator,​E> method,
                                                                     org.apache.commons.math3.random.RandomGenerator rnd)
        Generates random polynomial
        Parameters:
        nVars - number of variables
        minDegree - minimal exponent
        maxDegree - maximalexponent
        size - number of elements in the result
        ring - the coefficient ring
        ordering - monomial order
        method - method for generating random coefficients
        rnd - random source
        Returns:
        random polynomial
      • randomPolynomial

        public static <E> MultivariatePolynomial<E> randomPolynomial​(int nVars,
                                                                     int degree,
                                                                     int size,
                                                                     Ring<E> ring,
                                                                     Comparator<DegreeVector> ordering,
                                                                     org.apache.commons.math3.random.RandomGenerator rnd)
        Generates random polynomial
        Parameters:
        nVars - number of variables
        degree - maximal degree of the result
        size - number of elements in the result
        ring - the coefficient ring
        ordering - monomial order
        rnd - random source
        Returns:
        random polynomial
      • randomPolynomial

        public static MultivariatePolynomialZp64 randomPolynomial​(int nVars,
                                                                  int degree,
                                                                  int size,
                                                                  IntegersZp64 ring,
                                                                  org.apache.commons.math3.random.RandomGenerator rnd)
        Generates random Zp[X] polynomial over machine integers
        Parameters:
        nVars - number of variables
        degree - maximal degree of the result
        size - number of elements in the result
        ring - the coefficient ring
        rnd - random source
        Returns:
        random polynomial
      • randomPolynomial

        public static MultivariatePolynomialZp64 randomPolynomial​(int nVars,
                                                                  int degree,
                                                                  int size,
                                                                  IntegersZp64 ring,
                                                                  Comparator<DegreeVector> ordering,
                                                                  org.apache.commons.math3.random.RandomGenerator rnd)
        Generates random Zp[X] polynomial over machine integers
        Parameters:
        nVars - number of variables
        degree - maximal degree of the result
        size - number of elements in the result
        ring - the coefficient ring
        ordering - monomial order
        rnd - random source
        Returns:
        random polynomial
      • randomSharpPolynomial

        public static MultivariatePolynomialZp64 randomSharpPolynomial​(int nVars,
                                                                       int degree,
                                                                       int size,
                                                                       IntegersZp64 ring,
                                                                       Comparator<DegreeVector> ordering,
                                                                       org.apache.commons.math3.random.RandomGenerator rnd)
        Generates random Zp[X] polynomial over machine integers
        Parameters:
        nVars - number of variables
        degree - maximal degree of the result
        size - number of elements in the result
        ring - the coefficient ring
        ordering - monomial order
        rnd - random source
        Returns:
        random polynomial
      • randomSharpPolynomial

        public static <E> MultivariatePolynomial<E> randomSharpPolynomial​(int nVars,
                                                                          int degree,
                                                                          int size,
                                                                          Ring<E> ring,
                                                                          Comparator<DegreeVector> ordering,
                                                                          Function<org.apache.commons.math3.random.RandomGenerator,​E> rndCoefficients,
                                                                          org.apache.commons.math3.random.RandomGenerator rnd)
        Generates random Zp[X] polynomial over machine integers
        Parameters:
        nVars - number of variables
        degree - maximal degree of the result
        size - number of elements in the result
        ring - the coefficient ring
        ordering - monomial order
        rnd - random source
        Returns:
        random polynomial
      • randomPolynomial

        public static <Term extends AMonomial<Term>,​Poly extends AMultivariatePolynomial<Term,​Poly>> Poly randomPolynomial​(Poly factory,
                                                                                                                                       int degree,
                                                                                                                                       int size,
                                                                                                                                       org.apache.commons.math3.random.RandomGenerator rnd)
        Generates random multivariate polynomial
        Parameters:
        factory - factory polynomial
        degree - maximal degree of the result
        size - number of elements in the result
        rnd - random source
        Returns:
        random polynomial