Package cc.redberry.rings.poly
Class QuotientRing<Term extends AMonomial<Term>,Poly extends AMultivariatePolynomial<Term,Poly>>
java.lang.Object
cc.redberry.rings.ARing<Poly>
cc.redberry.rings.poly.QuotientRing<Term,Poly>
- All Implemented Interfaces:
IParser<Poly>
,Stringifiable<Poly>
,IPolynomialRing<Poly>
,Ring<Poly>
,Serializable
,Iterable<Poly>
,Comparator<Poly>
public class QuotientRing<Term extends AMonomial<Term>,Poly extends AMultivariatePolynomial<Term,Poly>> extends ARing<Poly> implements IPolynomialRing<Poly>
Multivariate quotient ring
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description QuotientRing(MultivariateRing<Poly> baseRing, Ideal<Term,Poly> ideal)
-
Method Summary
Modifier and Type Method Description Poly
add(Poly a, Poly b)
Add two elementsBigInteger
cardinality()
Returns the number of elements in this ring (cardinality) or null if ring is infiniteBigInteger
characteristic()
Returns characteristic of this ringint
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[]
divideAndRemainder(Poly dividend, Poly divider)
Returns quotient and remainder ofdividend / divider
Poly
factory()
Factory polynomialPoly
getOne()
Returns unit element of this ring (one)Poly
getZero()
Returns zero element of this ringboolean
isEuclideanRing()
Returns whether this ring is a Euclidean ringboolean
isField()
Returns whether this ring is a fieldboolean
isOne(Poly element)
Tests whether specified element is one (exactly)boolean
isUnit(Poly element)
Tests whether specified element is a ring unitboolean
isZero(Poly element)
Tests whether specified element is zeroIterator<Poly>
iterator()
Returns iterator over ring elements (for finite rings, otherwise throws exception)Poly
mod(Poly el)
Poly
multiply(Poly a, Poly b)
Multiplies two elementsPoly
negate(Poly element)
Negates the given elementPoly
normalForm(Poly el)
int
nVariables()
Number of polynomial variablesPoly
parse(String string)
Parse string into ring elementPoly
randomElement(org.apache.commons.math3.random.RandomGenerator rnd)
Returns a random element from this ringPoly
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 elementelement ^ (-1)
Poly
subtract(Poly a, Poly b)
Subtractsb
froma
String
toString()
String
toString(IStringifier<Poly> stringifier)
convert this to string with the use of stringifierPoly
valueOf(long val)
Returns ring element associated with specifiedlong
Poly
valueOf(Poly val)
Converts a value from other ring to this ring.Poly
valueOfBigInteger(BigInteger val)
Returns ring element associated with specified integerPoly
variable(int variable)
Creates poly representing a single specified variableMethods inherited from class cc.redberry.rings.ARing
isPerfectPower, perfectPowerBase, perfectPowerExponent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface cc.redberry.rings.poly.IPolynomialRing
mkCoder, parse, signum
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface cc.redberry.rings.Ring
abs, add, addMutable, createArray, createArray, createArray, createArray, createArray2d, createArray2d, createZeroesArray, createZeroesArray2d, decrement, divideExact, divideExactMutable, divideOrNull, extendedGCD, factor, factorial, factorSquareFree, fillZeros, firstBezoutCoefficient, gcd, gcd, gcd, getNegativeOne, increment, isFinite, isFiniteField, isMinusOne, isPerfectPower, isUnitOrZero, lcm, lcm, lcm, max, min, multiply, multiply, multiply, multiplyMutable, negateMutable, perfectPowerBase, perfectPowerExponent, pow, pow, pow, quotient, randomElement, randomElementTree, randomNonZeroElement, remainder, setToValueOf, subtractMutable, valueOf
-
Field Details
-
Constructor Details
-
QuotientRing
-
-
Method Details
-
nVariables
public int nVariables()Description copied from interface:IPolynomialRing
Number of polynomial variables- Specified by:
nVariables
in interfaceIPolynomialRing<Term extends AMonomial<Term>>
-
factory
Description copied from interface:IPolynomialRing
Factory polynomial- Specified by:
factory
in interfaceIPolynomialRing<Term extends AMonomial<Term>>
-
variable
Description copied from interface:IPolynomialRing
Creates poly representing a single specified variable- Specified by:
variable
in interfaceIPolynomialRing<Term extends AMonomial<Term>>
-
isField
public boolean isField()Description copied from interface:Ring
Returns whether this ring is a field -
isEuclideanRing
public boolean isEuclideanRing()Description copied from interface:Ring
Returns whether this ring is a Euclidean ring- Specified by:
isEuclideanRing
in interfaceRing<Term extends AMonomial<Term>>
- Returns:
- whether this ring is a Euclidean ring
-
cardinality
Description copied from interface:Ring
Returns the number of elements in this ring (cardinality) or null if ring is infinite- Specified by:
cardinality
in interfaceRing<Term extends AMonomial<Term>>
- Returns:
- the number of elements in this ring (cardinality) or null if ring is infinite
-
characteristic
Description copied from interface:Ring
Returns characteristic of this ring- Specified by:
characteristic
in interfaceRing<Term extends AMonomial<Term>>
- Returns:
- characteristic of this ring
-
mod
-
normalForm
-
add
Description copied from interface:Ring
Add two elements -
subtract
Description copied from interface:Ring
Subtractsb
froma
-
multiply
Description copied from interface:Ring
Multiplies two elements -
negate
Description copied from interface:Ring
Negates the given element -
copy
Description copied from interface:Ring
Makes a deep copy of the specified element (for immutable instances the same reference returned). -
divideAndRemainder
Description copied from interface:Ring
Returns quotient and remainder ofdividend / divider
- Specified by:
divideAndRemainder
in interfaceRing<Term extends AMonomial<Term>>
- Parameters:
dividend
- the dividenddivider
- the divider- Returns:
{quotient, remainder}
-
reciprocal
Description copied from interface:Ring
Gives the inverse elementelement ^ (-1)
- Specified by:
reciprocal
in interfaceRing<Term extends AMonomial<Term>>
- Parameters:
element
- the element- Returns:
element ^ (-1)
-
getZero
Description copied from interface:Ring
Returns zero element of this ring -
getOne
Description copied from interface:Ring
Returns unit element of this ring (one) -
isZero
Description copied from interface:Ring
Tests whether specified element is zero -
isOne
Description copied from interface:Ring
Tests whether specified element is one (exactly) -
isUnit
Description copied from interface:Ring
Tests whether specified element is a ring unit -
valueOf
Description copied from interface:Ring
Returns ring element associated with specifiedlong
-
valueOfBigInteger
Description copied from interface:Ring
Returns ring element associated with specified integer- Specified by:
valueOfBigInteger
in interfaceRing<Term extends AMonomial<Term>>
- Parameters:
val
- integer- Returns:
- ring element associated with specified integer
-
valueOf
Description copied from interface:Ring
Converts a value from other ring to this ring. The result is not guarantied to be a new instance (i.e.val == valueOf(val)
is possible). -
iterator
Description copied from interface:Ring
Returns iterator over ring elements (for finite rings, otherwise throws exception) -
compare
- Specified by:
compare
in interfaceComparator<Term extends AMonomial<Term>>
-
parse
Description copied from interface:Ring
Parse string into ring element -
randomElement
Description copied from interface:Ring
Returns a random element from this ring- Specified by:
randomElement
in interfaceRing<Term extends AMonomial<Term>>
- Parameters:
rnd
- the source of randomness- Returns:
- random element from this ring
-
randomElementTree
Description copied from interface:Ring
If this ring has a complicated nested structure, this method guaranties that the resulting random element will reflect ring complicated structure, i.e. the result will be roughly as complicated as the ring is- Specified by:
randomElementTree
in interfaceRing<Term extends AMonomial<Term>>
- Returns:
- random element from this ring
-
toString
Description copied from interface:Stringifiable
convert this to string with the use of stringifier- Specified by:
toString
in interfaceStringifiable<Term extends AMonomial<Term>>
-
toString
-