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 classIMonomialAlgebra.MonomialAlgebra<E>Generic term algebrastatic classIMonomialAlgebra.MonomialAlgebraZp64Term algebra for terms over Zp
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Termcreate(int[] exponents)creates term with specified exponents and unit coefficientTermcreate(DegreeVector degreeVector)creates term with specified exponents and unit coefficientTerm[]createArray(int length)creates generic array of specified lengthdefault TermdivideExact(DegreeVector dividend, Term divider)Gives quotientdividend / divideror throwsArithmeticExceptionif exact division is not possibledefault TermdivideExact(Term dividend, Term divider)Gives quotientdividend / divideror throwsArithmeticExceptionif exact division is not possibleTermdivideOrNull(Term dividend, Term divider)Gives quotientdividend / divideror null if exact division is not possibleTermgetUnitTerm(int nVariables)creates a unit termTermgetZeroTerm(int nVariables)creates a zero termbooleanhaveSameCoefficients(Term a, Term b)whether two terms have the same coefficientsdefault booleanisConstant(Term term)Whether term is constantbooleanisOne(Term term)Whether term is onebooleanisPureDegreeVector(Term term)Whether term has unit coefficientbooleanisUnit(Term term)Whether term is unitbooleanisZero(Term term)Whether term is zeroTermmultiply(Term a, BigInteger b)Multiplies term by a numberTermmultiply(Term a, Term b)Multiplies two termsTermnegate(Term term)Negates termTermpow(Term term, int exponent)Raise term in a power ofexponent
-
-
-
Method Detail
-
multiply
Term multiply(Term a, BigInteger b)
Multiplies term by a number
-
divideOrNull
Term divideOrNull(Term dividend, Term divider)
Gives quotientdividend / divideror null if exact division is not possible
-
divideExact
default Term divideExact(Term dividend, Term divider)
Gives quotientdividend / divideror throwsArithmeticExceptionif exact division is not possible
-
divideExact
default Term divideExact(DegreeVector dividend, Term divider)
Gives quotientdividend / divideror throwsArithmeticExceptionif exact division is not possible
-
pow
Term pow(Term term, int exponent)
Raise term in a power ofexponent- Parameters:
term- the termexponent- the exponent- Returns:
term^exponent
-
isZero
boolean isZero(Term term)
Whether term is zero
-
isOne
boolean isOne(Term term)
Whether term is one
-
isUnit
boolean isUnit(Term term)
Whether term is unit
-
isConstant
default boolean isConstant(Term term)
Whether term is constant
-
isPureDegreeVector
boolean isPureDegreeVector(Term term)
Whether term has unit coefficient
-
create
Term create(int[] exponents)
creates term with specified exponents and unit coefficient
-
create
Term create(DegreeVector degreeVector)
creates term with specified exponents and unit coefficient
-
createArray
Term[] createArray(int length)
creates generic array of specified length
-
getUnitTerm
Term getUnitTerm(int nVariables)
creates a unit term
-
getZeroTerm
Term getZeroTerm(int nVariables)
creates a zero term
-
-