Poly - type of multivariate polynomialspublic final class MultivariateRing<Poly extends AMultivariatePolynomial<?,Poly>> extends ARing<Poly>
| Modifier and Type | Field and Description |
|---|---|
static int |
DEGREE_OF_RANDOM_POLY
Default degree of polynomial generated with
randomElementTree(RandomGenerator) |
static int |
SIZE_OF_RANDOM_POLY
Default size of polynomial generated with
randomElementTree(RandomGenerator) |
| Constructor and Description |
|---|
MultivariateRing(Poly factory)
Creates ring of multivariate polynomials which support operations over multivariate polynomials of the type and
number of variables same as of provided
factory polynomial |
| Modifier and Type | Method and Description |
|---|---|
Poly |
add(Poly a,
Poly b)
Add two elements
|
Poly |
addMutable(Poly a,
Poly b)
Adds two elements and destroys the initial content of
a. |
BigInteger |
cardinality()
Returns the number of elements in this ring (cardinality) or null if ring is infinite
|
BigInteger |
characteristic()
Returns characteristic of this ring
|
int |
compare(Poly o1,
Poly o2) |
Poly |
copy(Poly element)
Makes a deep copy of the specified element (for immutable instances the same reference returned).
|
Poly |
create(DegreeVector term)
Creates multivariate polynomial over the same ring as this with the single monomial
|
Poly[] |
divideAndRemainder(Poly dividend,
Poly divider)
Returns quotient and remainder of
dividend / divider |
MultivariateRing<Poly> |
dropVariable() |
boolean |
equals(Object o) |
PolynomialFactorDecomposition<Poly> |
factor(Poly element)
Factor specified element
|
PolynomialFactorDecomposition<Poly> |
factorSquareFree(Poly element)
Square-free factorization of specified element
|
Poly |
factory()
Factory polynomial
|
Poly |
gcd(Iterable<Poly> elements)
Returns greatest common divisor of specified elements
|
Poly |
gcd(Poly[] elements)
Returns greatest common divisor of specified elements
|
Poly |
gcd(Poly a,
Poly b)
Returns the greatest common divisor of two elements
|
Poly |
getOne()
Returns unit element of this ring (one)
|
Poly |
getZero()
Returns zero element of this ring
|
int |
hashCode() |
boolean |
isEuclideanRing()
Returns whether this ring is a Euclidean ring
|
boolean |
isField()
Returns whether this ring is a field
|
boolean |
isOne(Poly element)
Tests whether specified element is one (exactly)
|
boolean |
isUnit(Poly element)
Tests whether specified element is a ring unit
|
boolean |
isZero(Poly element)
Tests whether specified element is zero
|
Iterator<Poly> |
iterator()
Returns iterator over ring elements (for finite rings, otherwise throws exception)
|
<Term extends AMonomial<Term>> |
monomialAlgebra() |
Poly |
multiply(Poly a,
Poly b)
Multiplies two elements
|
Poly |
multiplyMutable(Poly a,
Poly b)
Multiplies two elements and destroys the initial content of
a |
Poly |
negate(Poly element)
Negates the given element
|
Poly |
negateMutable(Poly element)
Negates the given element and destroys the initial content of
element |
int |
nVariables()
Number of polynomial variables
|
Comparator<DegreeVector> |
ordering() |
Poly |
parse(String string)
Parse string into ring element
|
Poly |
pow(Poly base,
BigInteger exponent)
Returns
base in a power of exponent (non negative) |
Poly |
randomElement(int degree,
int size)
Generates random multivariate polynomial
|
Poly |
randomElement(int degree,
int size,
org.apache.commons.math3.random.RandomGenerator rnd)
Generates random multivariate polynomial
|
Poly |
randomElement(org.apache.commons.math3.random.RandomGenerator rnd)
Gives a random constant polynomial.
|
Poly |
randomElementTree(int degree,
int size,
org.apache.commons.math3.random.RandomGenerator rnd)
Generates random multivariate polynomial
|
Poly |
randomElementTree(org.apache.commons.math3.random.RandomGenerator rnd)
If this ring has a complicated nested structure, this method guaranties that the resulting random element will
reflect ring complicated structure, i.e.
|
Poly |
reciprocal(Poly element)
Gives the inverse element
element ^ (-1) |
Poly |
subtract(Poly a,
Poly b)
Subtracts
b from a |
Poly |
subtractMutable(Poly a,
Poly b)
Subtracts
b from a and destroys the initial content of a |
String |
toString() |
String |
toString(IStringifier<Poly> stringifier)
convert this to string with the use of stringifier
|
String |
toString(String... variables) |
Poly |
valueOf(long val)
Returns ring element associated with specified
long |
Poly |
valueOf(Poly val)
Converts a value from other ring to this ring.
|
Poly |
valueOfBigInteger(BigInteger val)
Returns ring element associated with specified integer
|
Poly |
variable(int variable)
Creates poly representing a single specified variable
|
isPerfectPower, perfectPowerBase, perfectPowerExponentclone, finalize, getClass, notify, notifyAll, wait, wait, waitmkCoder, parse, signumabs, add, createArray, createArray, createArray, createArray, createArray2d, createArray2d, createZeroesArray, createZeroesArray2d, decrement, divideExact, divideExactMutable, divideOrNull, extendedGCD, factorial, fillZeros, firstBezoutCoefficient, getNegativeOne, increment, isFinite, isFiniteField, isMinusOne, isPerfectPower, isUnitOrZero, lcm, lcm, lcm, max, min, multiply, multiply, multiply, perfectPowerBase, perfectPowerExponent, pow, pow, quotient, randomElement, randomElementTree, randomNonZeroElement, remainder, setToValueOf, valueOfcomparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongforEach, spliteratorpublic static final int DEGREE_OF_RANDOM_POLY
randomElementTree(RandomGenerator)public static final int SIZE_OF_RANDOM_POLY
randomElementTree(RandomGenerator)public MultivariateRing(Poly factory)
factory polynomialfactory - the factory polynomial (the exact value of factory is irrelevant) which fixes the element
type of this ring, coefficient ring and the number of variablespublic <Term extends AMonomial<Term>> IMonomialAlgebra<Term> monomialAlgebra()
public int nVariables()
IPolynomialRingpublic Comparator<DegreeVector> ordering()
public MultivariateRing<Poly> dropVariable()
public Poly[] divideAndRemainder(Poly dividend, Poly divider)
Ringdividend / dividerdividend - the dividenddivider - the divider{quotient, remainder}public Poly gcd(Poly a, Poly b)
Ringa - the first elementb - the second elementpublic Poly gcd(Poly[] elements)
Ringelements - the elementspublic Poly gcd(Iterable<Poly> elements)
Ringelements - the elementspublic PolynomialFactorDecomposition<Poly> factorSquareFree(Poly element)
Ringpublic PolynomialFactorDecomposition<Poly> factor(Poly element)
Ringpublic Poly variable(int variable)
IPolynomialRingpublic Poly create(DegreeVector term)
term - the monomialpublic Poly randomElement(int degree, int size, org.apache.commons.math3.random.RandomGenerator rnd)
degree - maximal degree of the resultsize - number of elements in the resultrnd - random sourcepublic Poly randomElementTree(int degree, int size, org.apache.commons.math3.random.RandomGenerator rnd)
degree - maximal degree of the resultsize - number of elements in the resultrnd - random sourcepublic Poly randomElement(int degree, int size)
degree - maximal degree of the resultsize - number of elements in the resultpublic Poly randomElement(org.apache.commons.math3.random.RandomGenerator rnd)
RandomMultivariatePolynomialsrnd - the source of randomnessRandomMultivariatePolynomialspublic Poly randomElementTree(org.apache.commons.math3.random.RandomGenerator rnd)
Ringpublic Poly factory()
IPolynomialRingfactory in interface IPolynomialRing<Poly extends IPolynomial<Poly>>public boolean isEuclideanRing()
RingisEuclideanRing in interface Ring<Poly extends IPolynomial<Poly>>public final boolean isField()
RingisField in interface Ring<Poly extends IPolynomial<Poly>>public final BigInteger cardinality()
Ringcardinality in interface Ring<Poly extends IPolynomial<Poly>>public final BigInteger characteristic()
Ringcharacteristic in interface Ring<Poly extends IPolynomial<Poly>>public final Poly add(Poly a,
Poly b)
Ringadd in interface Ring<Poly extends IPolynomial<Poly>>a - the first elementb - the second elementpublic final Poly subtract(Poly a,
Poly b)
Ringb from asubtract in interface Ring<Poly extends IPolynomial<Poly>>a - the first elementb - the second elementpublic final Poly multiply(Poly a,
Poly b)
Ringmultiply in interface Ring<Poly extends IPolynomial<Poly>>a - the first elementb - the second elementpublic final Poly negate(Poly element)
Ringnegate in interface Ring<Poly extends IPolynomial<Poly>>element - the ring elementpublic Poly pow(Poly base,
BigInteger exponent)
Ringbase in a power of exponent (non negative)pow in interface Ring<Poly extends IPolynomial<Poly>>base - baseexponent - exponent (non negative)base in a power of exponentpublic Poly addMutable(Poly a,
Poly b)
Ringa.addMutable in interface Ring<Poly extends IPolynomial<Poly>>a - the first element (may be destroyed)b - the second elementpublic Poly subtractMutable(Poly a,
Poly b)
Ringb from a and destroys the initial content of asubtractMutable in interface Ring<Poly extends IPolynomial<Poly>>a - the first element (may be destroyed)b - the second elementpublic Poly multiplyMutable(Poly a,
Poly b)
RingamultiplyMutable in interface Ring<Poly extends IPolynomial<Poly>>a - the first element (may be destroyed)b - the second elementpublic Poly negateMutable(Poly element)
RingelementnegateMutable in interface Ring<Poly extends IPolynomial<Poly>>element - the ring element (may be destroyed)public final Poly reciprocal(Poly element)
Ringelement ^ (-1) reciprocal in interface Ring<Poly extends IPolynomial<Poly>>element - the elementelement ^ (-1)public final Poly getZero()
RinggetZero in interface Ring<Poly extends IPolynomial<Poly>>public final Poly getOne()
RinggetOne in interface Ring<Poly extends IPolynomial<Poly>>public final boolean isZero(Poly element)
RingisZero in interface Ring<Poly extends IPolynomial<Poly>>element - the ring elementpublic final boolean isOne(Poly element)
RingisOne in interface Ring<Poly extends IPolynomial<Poly>>element - the ring elementRing.isUnit(Object)public boolean isUnit(Poly element)
RingisUnit in interface Ring<Poly extends IPolynomial<Poly>>element - the ring elementRing.isOne(Object)public final Poly valueOf(long val)
RinglongvalueOf in interface Ring<Poly extends IPolynomial<Poly>>val - machine integerlongpublic Poly valueOfBigInteger(BigInteger val)
RingvalueOfBigInteger in interface Ring<Poly extends IPolynomial<Poly>>val - integerpublic final Poly valueOf(Poly val)
Ringval
== valueOf(val) is possible).valueOf in interface Ring<Poly extends IPolynomial<Poly>>val - some element from any ringvalpublic Poly copy(Poly element)
Ringcopy in interface Ring<Poly extends IPolynomial<Poly>>element - the elementpublic final int compare(Poly o1,
Poly o2)
compare in interface Comparator<Poly extends IPolynomial<Poly>>public final boolean equals(Object o)
equals in interface Comparator<Poly extends IPolynomial<Poly>>equals in class Objectpublic Iterator<Poly> iterator()
Ringiterator in interface Ring<Poly extends IPolynomial<Poly>>iterator in interface Iterable<Poly extends IPolynomial<Poly>>public Poly parse(String string)
Ringparse in interface IParser<Poly extends IPolynomial<Poly>>parse in interface Ring<Poly extends IPolynomial<Poly>>string - stringCoderpublic String toString(IStringifier<Poly> stringifier)
StringifiabletoString in interface Stringifiable<Poly extends IPolynomial<Poly>>Copyright © 2022. All rights reserved.