Package cc.redberry.rings.poly.multivar
Interface IMonomialAlgebra<Term extends AMonomial<Term>>
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
IMonomialAlgebra.MonomialAlgebra
,IMonomialAlgebra.MonomialAlgebraZp64
public interface IMonomialAlgebra<Term extends AMonomial<Term>> extends Serializable
Algebraic operations (multiplication, division) and utility methods for monomials.
- Since:
- 2.3
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IMonomialAlgebra.MonomialAlgebra<E>
Generic term algebrastatic class
IMonomialAlgebra.MonomialAlgebraZp64
Term algebra for terms over Zp -
Method Summary
Modifier and Type Method Description Term
create(int[] exponents)
creates term with specified exponents and unit coefficientTerm
create(DegreeVector degreeVector)
creates term with specified exponents and unit coefficientTerm[]
createArray(int length)
creates generic array of specified lengthdefault Term
divideExact(DegreeVector dividend, Term divider)
Gives quotientdividend / divider
or throwsArithmeticException
if exact division is not possibledefault Term
divideExact(Term dividend, Term divider)
Gives quotientdividend / divider
or throwsArithmeticException
if exact division is not possibleTerm
divideOrNull(Term dividend, Term divider)
Gives quotientdividend / divider
or null if exact division is not possibleTerm
getUnitTerm(int nVariables)
creates a unit termTerm
getZeroTerm(int nVariables)
creates a zero termboolean
haveSameCoefficients(Term a, Term b)
whether two terms have the same coefficientsdefault boolean
isConstant(Term term)
Whether term is constantboolean
isOne(Term term)
Whether term is oneboolean
isPureDegreeVector(Term term)
Whether term has unit coefficientboolean
isUnit(Term term)
Whether term is unitboolean
isZero(Term term)
Whether term is zeroTerm
multiply(Term a, BigInteger b)
Multiplies term by a numberTerm
multiply(Term a, Term b)
Multiplies two termsTerm
negate(Term term)
Negates termTerm
pow(Term term, int exponent)
Raise term in a power ofexponent
-
Method Details
-
multiply
Multiplies two terms -
multiply
Multiplies term by a number -
divideOrNull
Gives quotientdividend / divider
or null if exact division is not possible -
divideExact
Gives quotientdividend / divider
or throwsArithmeticException
if exact division is not possible -
divideExact
Gives quotientdividend / divider
or throwsArithmeticException
if exact division is not possible -
pow
Raise term in a power ofexponent
- Parameters:
term
- the termexponent
- the exponent- Returns:
term^exponent
-
negate
Negates term -
isZero
Whether term is zero -
isOne
Whether term is one -
isUnit
Whether term is unit -
isConstant
Whether term is constant -
isPureDegreeVector
Whether term has unit coefficient -
create
creates term with specified exponents and unit coefficient -
create
creates term with specified exponents and unit coefficient -
createArray
creates generic array of specified length -
getUnitTerm
creates a unit term -
getZeroTerm
creates a zero term -
haveSameCoefficients
whether two terms have the same coefficients
-