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
-
-
Constructor Summary
Constructors Constructor Description QuotientRing(MultivariateRing<Poly> baseRing, Ideal<Term,Poly> ideal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Polyadd(Poly a, Poly b)Add two elementsBigIntegercardinality()Returns the number of elements in this ring (cardinality) or null if ring is infiniteBigIntegercharacteristic()Returns characteristic of this ringintcompare(Poly o1, Poly o2)Polycopy(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 / dividerPolyfactory()Factory polynomialPolygetOne()Returns unit element of this ring (one)PolygetZero()Returns zero element of this ringbooleanisEuclideanRing()Returns whether this ring is a Euclidean ringbooleanisField()Returns whether this ring is a fieldbooleanisOne(Poly element)Tests whether specified element is one (exactly)booleanisUnit(Poly element)Tests whether specified element is a ring unitbooleanisZero(Poly element)Tests whether specified element is zeroIterator<Poly>iterator()Returns iterator over ring elements (for finite rings, otherwise throws exception)Polymod(Poly el)Polymultiply(Poly a, Poly b)Multiplies two elementsPolynegate(Poly element)Negates the given elementPolynormalForm(Poly el)intnVariables()Number of polynomial variablesPolyparse(String string)Parse string into ring elementPolyrandomElement(org.apache.commons.math3.random.RandomGenerator rnd)Returns a random element from this ringPolyrandomElementTree(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.Polyreciprocal(Poly element)Gives the inverse elementelement ^ (-1)Polysubtract(Poly a, Poly b)SubtractsbfromaStringtoString()StringtoString(IStringifier<Poly> stringifier)convert this to string with the use of stringifierPolyvalueOf(long val)Returns ring element associated with specifiedlongPolyvalueOf(Poly val)Converts a value from other ring to this ring.PolyvalueOfBigInteger(BigInteger val)Returns ring element associated with specified integerPolyvariable(int variable)Creates poly representing a single specified variable-
Methods 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 Detail
-
baseRing
public final MultivariateRing<Poly extends AMultivariatePolynomial<Term,Poly>> baseRing
the base ring
-
-
Constructor Detail
-
QuotientRing
public QuotientRing(MultivariateRing<Poly> baseRing, Ideal<Term,Poly> ideal)
-
-
Method Detail
-
nVariables
public int nVariables()
Description copied from interface:IPolynomialRingNumber of polynomial variables- Specified by:
nVariablesin interfaceIPolynomialRing<Term extends AMonomial<Term>>
-
factory
public Poly factory()
Description copied from interface:IPolynomialRingFactory polynomial- Specified by:
factoryin interfaceIPolynomialRing<Term extends AMonomial<Term>>
-
variable
public Poly variable(int variable)
Description copied from interface:IPolynomialRingCreates poly representing a single specified variable- Specified by:
variablein interfaceIPolynomialRing<Term extends AMonomial<Term>>
-
isField
public boolean isField()
Description copied from interface:RingReturns whether this ring is a field
-
isEuclideanRing
public boolean isEuclideanRing()
Description copied from interface:RingReturns whether this ring is a Euclidean ring- Specified by:
isEuclideanRingin interfaceRing<Term extends AMonomial<Term>>- Returns:
- whether this ring is a Euclidean ring
-
cardinality
public BigInteger cardinality()
Description copied from interface:RingReturns the number of elements in this ring (cardinality) or null if ring is infinite- Specified by:
cardinalityin interfaceRing<Term extends AMonomial<Term>>- Returns:
- the number of elements in this ring (cardinality) or null if ring is infinite
-
characteristic
public BigInteger characteristic()
Description copied from interface:RingReturns characteristic of this ring- Specified by:
characteristicin interfaceRing<Term extends AMonomial<Term>>- Returns:
- characteristic of this ring
-
subtract
public Poly subtract(Poly a, Poly b)
Description copied from interface:RingSubtractsbfroma
-
multiply
public Poly multiply(Poly a, Poly b)
Description copied from interface:RingMultiplies two elements
-
negate
public Poly negate(Poly element)
Description copied from interface:RingNegates the given element
-
copy
public Poly copy(Poly element)
Description copied from interface:RingMakes a deep copy of the specified element (for immutable instances the same reference returned).
-
divideAndRemainder
public Poly[] divideAndRemainder(Poly dividend, Poly divider)
Description copied from interface:RingReturns quotient and remainder ofdividend / divider- Specified by:
divideAndRemainderin interfaceRing<Term extends AMonomial<Term>>- Parameters:
dividend- the dividenddivider- the divider- Returns:
{quotient, remainder}
-
reciprocal
public Poly reciprocal(Poly element)
Description copied from interface:RingGives the inverse elementelement ^ (-1)- Specified by:
reciprocalin interfaceRing<Term extends AMonomial<Term>>- Parameters:
element- the element- Returns:
element ^ (-1)
-
getZero
public Poly getZero()
Description copied from interface:RingReturns zero element of this ring
-
getOne
public Poly getOne()
Description copied from interface:RingReturns unit element of this ring (one)
-
isZero
public boolean isZero(Poly element)
Description copied from interface:RingTests whether specified element is zero
-
isOne
public boolean isOne(Poly element)
Description copied from interface:RingTests whether specified element is one (exactly)
-
isUnit
public boolean isUnit(Poly element)
Description copied from interface:RingTests whether specified element is a ring unit
-
valueOf
public Poly valueOf(long val)
Description copied from interface:RingReturns ring element associated with specifiedlong
-
valueOfBigInteger
public Poly valueOfBigInteger(BigInteger val)
Description copied from interface:RingReturns ring element associated with specified integer- Specified by:
valueOfBigIntegerin interfaceRing<Term extends AMonomial<Term>>- Parameters:
val- integer- Returns:
- ring element associated with specified integer
-
valueOf
public Poly valueOf(Poly val)
Description copied from interface:RingConverts 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
public Iterator<Poly> iterator()
Description copied from interface:RingReturns iterator over ring elements (for finite rings, otherwise throws exception)
-
compare
public int compare(Poly o1, Poly o2)
- Specified by:
comparein interfaceComparator<Term extends AMonomial<Term>>
-
parse
public Poly parse(String string)
Description copied from interface:RingParse string into ring element
-
randomElement
public Poly randomElement(org.apache.commons.math3.random.RandomGenerator rnd)
Description copied from interface:RingReturns a random element from this ring- Specified by:
randomElementin interfaceRing<Term extends AMonomial<Term>>- Parameters:
rnd- the source of randomness- Returns:
- random element from this ring
-
randomElementTree
public Poly randomElementTree(org.apache.commons.math3.random.RandomGenerator rnd)
Description copied from interface:RingIf 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:
randomElementTreein interfaceRing<Term extends AMonomial<Term>>- Returns:
- random element from this ring
-
toString
public String toString(IStringifier<Poly> stringifier)
Description copied from interface:Stringifiableconvert this to string with the use of stringifier- Specified by:
toStringin interfaceStringifiable<Term extends AMonomial<Term>>
-
-