public final class RandomUnivariatePolynomials extends Object
Modifier and Type | Method and Description |
---|---|
static <E> E[] |
randomArray(int degree,
Ring<E> ring,
org.apache.commons.math3.random.RandomGenerator rnd)
Creates random array of length
degree + 1 with elements from the specified ring |
static BigInteger[] |
randomBigArray(int degree,
BigInteger bound,
org.apache.commons.math3.random.RandomGenerator rnd)
Creates random array of length
degree + 1 with elements bounded by bound (by absolute value). |
static long[] |
randomLongArray(int degree,
long bound,
org.apache.commons.math3.random.RandomGenerator rnd)
Creates random array of length
degree + 1 with elements bounded by bound (by absolute value). |
static UnivariatePolynomial<BigInteger> |
randomMonicPoly(int degree,
BigInteger modulus,
org.apache.commons.math3.random.RandomGenerator rnd)
Creates random polynomial of specified
degree . |
static UnivariatePolynomialZp64 |
randomMonicPoly(int degree,
long modulus,
org.apache.commons.math3.random.RandomGenerator rnd)
Creates random polynomial of specified
degree . |
static <E> UnivariatePolynomial<E> |
randomMonicPoly(int degree,
Ring<E> ring,
org.apache.commons.math3.random.RandomGenerator rnd)
Creates random polynomial of specified
degree . |
static UnivariatePolynomial<BigInteger> |
randomPoly(int degree,
BigInteger bound,
org.apache.commons.math3.random.RandomGenerator rnd)
Creates random polynomial of specified
degree with elements bounded by bound (by absolute
value). |
static UnivariatePolynomialZ64 |
randomPoly(int degree,
long bound,
org.apache.commons.math3.random.RandomGenerator rnd)
Creates random polynomial of specified
degree with elements bounded by bound (by absolute
value). |
static UnivariatePolynomialZ64 |
randomPoly(int degree,
org.apache.commons.math3.random.RandomGenerator rnd)
Creates random polynomial of specified
degree . |
static <E> UnivariatePolynomial<E> |
randomPoly(int degree,
Ring<E> ring,
org.apache.commons.math3.random.RandomGenerator rnd)
Creates random polynomial of specified
degree with elements from specified ring |
static <Poly extends IUnivariatePolynomial<Poly>> |
randomPoly(Poly factory,
int degree,
org.apache.commons.math3.random.RandomGenerator rnd)
Creates random polynomial of specified
degree . |
public static <Poly extends IUnivariatePolynomial<Poly>> Poly randomPoly(Poly factory, int degree, org.apache.commons.math3.random.RandomGenerator rnd)
degree
.factory
- the factory (used to infer the type and the ring)degree
- polynomial degreernd
- random sourcedegree
public static UnivariatePolynomialZ64 randomPoly(int degree, org.apache.commons.math3.random.RandomGenerator rnd)
degree
.degree
- polynomial degreernd
- random sourcedegree
public static UnivariatePolynomialZp64 randomMonicPoly(int degree, long modulus, org.apache.commons.math3.random.RandomGenerator rnd)
degree
.degree
- polynomial degreernd
- random sourcedegree
public static UnivariatePolynomial<BigInteger> randomMonicPoly(int degree, BigInteger modulus, org.apache.commons.math3.random.RandomGenerator rnd)
degree
.degree
- polynomial degreernd
- random sourcedegree
public static <E> UnivariatePolynomial<E> randomMonicPoly(int degree, Ring<E> ring, org.apache.commons.math3.random.RandomGenerator rnd)
degree
.degree
- polynomial degreering
- the ringrnd
- random sourcedegree
public static UnivariatePolynomialZ64 randomPoly(int degree, long bound, org.apache.commons.math3.random.RandomGenerator rnd)
degree
with elements bounded by bound
(by absolute
value).degree
- polynomial degreebound
- absolute bound for coefficientsrnd
- random sourcedegree
with elements bounded by bound
(by absolute value)public static UnivariatePolynomial<BigInteger> randomPoly(int degree, BigInteger bound, org.apache.commons.math3.random.RandomGenerator rnd)
degree
with elements bounded by bound
(by absolute
value).degree
- polynomial degreebound
- absolute bound for coefficientsrnd
- random sourcedegree
with elements bounded by bound
(by absolute value)public static <E> UnivariatePolynomial<E> randomPoly(int degree, Ring<E> ring, org.apache.commons.math3.random.RandomGenerator rnd)
degree
with elements from specified ringdegree
- polynomial degreering
- the ringrnd
- random sourcedegree
with elements bounded by bound
(by absolute value)public static long[] randomLongArray(int degree, long bound, org.apache.commons.math3.random.RandomGenerator rnd)
degree + 1
with elements bounded by bound
(by absolute value).degree
- polynomial degreebound
- absolute bound for coefficientsrnd
- random sourcedegree + 1
with elements bounded by bound
(by absolute value)public static BigInteger[] randomBigArray(int degree, BigInteger bound, org.apache.commons.math3.random.RandomGenerator rnd)
degree + 1
with elements bounded by bound
(by absolute value).degree
- polynomial degreebound
- absolute bound for coefficientsrnd
- random sourcedegree + 1
with elements bounded by bound
(by absolute value)public static <E> E[] randomArray(int degree, Ring<E> ring, org.apache.commons.math3.random.RandomGenerator rnd)
degree + 1
with elements from the specified ringdegree
- polynomial degreering
- the ringrnd
- random sourcedegree + 1
with elements from specified ringCopyright © 2018. All rights reserved.