Class NTConstant
- All Implemented Interfaces:
Constant,Monomial,RationalExpression,NumericExpression,SymbolicExpression,SymbolicObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.udel.cis.vsl.sarl.IF.expr.SymbolicExpression
SymbolicExpression.SymbolicOperatorNested classes/interfaces inherited from interface edu.udel.cis.vsl.sarl.IF.object.SymbolicObject
SymbolicObject.SymbolicObjectKind -
Field Summary
Fields inherited from class edu.udel.cis.vsl.sarl.expr.common.HomogeneousExpression
debug -
Method Summary
Modifier and TypeMethodDescriptiondenominator(IdealFactory factory) Returns the denominator of this rational expression.Monomial[]expand(IdealFactory factory) Returns the expansion of this monomial.booleanhasNontrivialExpansion(IdealFactory factory) Determines whether or not this monomial could possibly have a non-trivial expansion.booleanisOne()Returns false, since this will be overridden in NumericExpression.booleanisZero()Returns false, since this will be overridden in NumericExpression.Monomial[]lower(IdealFactory factory) Computes a term map from performing a single outer-level expansion.maxDegreeOf(NumberFactory factory, Primitive primitive) Computes the maximum degree to whichprimitiveoccurs in thisMonomial.monic(IdealFactory factory) Returns the monic factor of this monomial.monomialConstant(IdealFactory factory) Returns the constant factor of this monomial.monomialDegree(NumberFactory factory) Returns the degree of the monic where each factor is considered to have degree 1.intmonomialOrder(IdealFactory factory) Computes the "monomial order" of thisMonomial.number()numerator(IdealFactory factory) Returns the numerator of this rational expressionpowerInt(IdealFactory factory, IntegerNumber n) Computes an expression equivalent to raising this expression to theexponentpower.powerRational(IdealFactory factory, RationalExpression exponent) Computes an expression equivalent to raising this expression to theexponentpower.Monomial[]termMap(IdealFactory factory) Returns the term map of this monomial.totalDegree(NumberFactory factory) The degree of this monomial if it were fully expanded to a polynomial in which the variables cannot be expressed as the sum, product, difference, or quotient of expressions.value()Returns theNumberObjectwrapped by thisConstant.Methods inherited from class edu.udel.cis.vsl.sarl.expr.common.HomogeneousExpression
argument, arguments, atomString, canonizeChildren, containsQuantifier, containsSubobject, getArguments, getFreeVars, isFalse, isNull, isNumeric, isTrue, numArguments, operator, printCompressedTree, size, symbolicObjectKind, toStringBuffer, toStringBuffer1, toStringBufferLong, typeMethods inherited from class edu.udel.cis.vsl.sarl.object.common.CommonSymbolicObject
equals, getOrder, hashCode, id, isCanonic, setInCanonic, setOrder, toStringMethods inherited from interface edu.udel.cis.vsl.sarl.IF.expr.SymbolicExpression
argument, atomString, getArguments, getFreeVars, isFalse, isNull, isNumeric, isTrue, numArguments, operator, printCompressedTree, size, typeMethods inherited from interface edu.udel.cis.vsl.sarl.IF.object.SymbolicObject
containsQuantifier, containsSubobject, equals, getOrder, hashCode, id, isCanonic, setInCanonic, setOrder, symbolicObjectKind, toString, toStringBuffer, toStringBufferLong
-
Method Details
-
value
Description copied from interface:ConstantReturns theNumberObjectwrapped by thisConstant.- Specified by:
valuein interfaceConstant- Returns:
- the underlying
NumberObject
-
number
Description copied from interface:Constant -
isZero
public boolean isZero()Description copied from class:HomogeneousExpressionReturns false, since this will be overridden in NumericExpression.- Specified by:
isZeroin interfaceSymbolicExpression- Overrides:
isZeroin classHomogeneousExpression<SymbolicObject>- Returns:
- true iff this is the integer 0 or the real 0
-
isOne
public boolean isOne()Description copied from class:HomogeneousExpressionReturns false, since this will be overridden in NumericExpression.- Specified by:
isOnein interfaceSymbolicExpression- Overrides:
isOnein classHomogeneousExpression<SymbolicObject>- Returns:
- true iff this is the integer 1 or the real 1
-
monomialConstant
Description copied from interface:MonomialReturns the constant factor of this monomial.- Specified by:
monomialConstantin interfaceMonomial- Parameters:
factory- the ideal factory responsible for this monomial- Returns:
- the constant factor of this monomial
-
monic
Description copied from interface:MonomialReturns the monic factor of this monomial. -
numerator
Description copied from interface:RationalExpressionReturns the numerator of this rational expression- Specified by:
numeratorin interfaceRationalExpression- Parameters:
factory- the ideal factory responsible for this expression- Returns:
- the numerator of this rational expression
-
denominator
Description copied from interface:RationalExpressionReturns the denominator of this rational expression.- Specified by:
denominatorin interfaceRationalExpression- Parameters:
factory- the ideal factory responsible for this expression- Returns:
- the denominator of this rational expression
-
termMap
Description copied from interface:MonomialReturns the term map of this monomial. -
monomialDegree
Description copied from interface:MonomialReturns the degree of the monic where each factor is considered to have degree 1. For example, (X^2+Y^2)^3*Z^2 has monomial degree 5: it has two factors, one of degree 3 and one of degree 2.- Specified by:
monomialDegreein interfaceMonomial- Parameters:
factory- theNumberFactoryused for this operation- Returns:
- The
IntegerNumberrepresents the monomial degree with NO expansion
-
expand
Description copied from interface:MonomialReturns the expansion of this monomial.- Specified by:
expandin interfaceMonomial- Parameters:
factory- the ideal factory responsible for this monomial- Returns:
- term map whose sum is equivalent to this but with no
Polynomials. - See Also:
-
totalDegree
Description copied from interface:MonomialThe degree of this monomial if it were fully expanded to a polynomial in which the variables cannot be expressed as the sum, product, difference, or quotient of expressions. For example, (X^2+Y^2)^3*Z^2 has total degree 8.- Specified by:
totalDegreein interfaceMonomial- Parameters:
factory- theNumberFactoryused for this operation- Returns:
- The
IntegerNumberrepresents total degree of this monomial after full expansion to a polynomial
-
hasNontrivialExpansion
Description copied from interface:MonomialDetermines whether or not this monomial could possibly have a non-trivial expansion. A trivial expansion is one consisting of exactly one term.- Specified by:
hasNontrivialExpansionin interfaceMonomial- Parameters:
factory- the ideal factory responsible for this monomial- Returns:
- if
falseis returned then this monomial has only a trivial expansion, otherwise is might have a nontrivial one
-
monomialOrder
Description copied from interface:MonomialComputes the "monomial order" of thisMonomial. This is defined as follows:- the monomial order of a
Constantis 0 - the monomial order of a
Primitivewhich is not aPolynomial(a "true primitive") is also 0 - the monomial order of a
PrimitivePowers the monomial order of itsPrimitive - the monomial order of a
Monicis the maximum of the monomial orders of itsPrimitivePowerfactors - the monomial order of a
Monomialis the monomial order of itsMonic - the monomial order of a
Polynomialwhich is not aMonomialis one more than the monomial orders of itsMonomialterms.
Another interpretation: consider this symbolic expressions as a rooted tree. Along any path from the root to a leaf, count the number of "+" (addition) operators to occur. (Note that each
Polynomialintroduces a single addition operator whose argument is a set of terms.) The maximum plus-count (over all paths) is the monomial order.- Specified by:
monomialOrderin interfaceMonomial- Parameters:
factory- theIdealFactoryresponsible for thisMonomial- Returns:
- the monomial order of this
Monomial
- the monomial order of a
-
lower
Description copied from interface:MonomialComputes a term map from performing a single outer-level expansion. This is in contrast with
Monomial.expand(IdealFactory), which performs a full expansion.Suppose the monomial order of this
Monomialis d. Then theMonomials occurring in the returned map will have monomial order at most d-1. Furthermore, if this is aPolynomial, theMonomialsoccurring in the returned map will have monomial order at most d-2 (assuming d>=2).- Specified by:
lowerin interfaceMonomial- Parameters:
factory- theIdealFactoryresponsible for thisMonomial- Returns:
- a term map with lower monomial order.
-
powerRational
Description copied from interface:RationalExpressionComputes an expression equivalent to raising this expression to the
exponentpower.Preconditions:
- if the monomial constant of the numerator of
exponentis an integer (including a real integer), it is 1 - if this has integer type then
exponenthas integer type
- Specified by:
powerRationalin interfaceRationalExpression- Parameters:
factory- the ideal factory responsible for this expressionexponent- the power to which this expression should be raised- Returns:
- an expression equivalent to raising this expression to the
exponentpower
- if the monomial constant of the numerator of
-
powerInt
Description copied from interface:RationalExpressionComputes an expression equivalent to raising this expression to theexponentpower. In this case the exponent is anIntegerNumber.- Specified by:
powerIntin interfaceConstant- Specified by:
powerIntin interfaceMonomial- Specified by:
powerIntin interfaceRationalExpression- Parameters:
factory- the ideal factory responsible for this expressionn- the power to which this expression should be raised, must be positive- Returns:
- an expression equivalent to raising this expression to the
exponentpower
-
maxDegreeOf
Description copied from interface:MonomialComputes the maximum degree to whichprimitiveoccurs in thisMonomial. For example the primitive X occurs with max degree 11 in XY(X+Z)^10.- Specified by:
maxDegreeOfin interfaceMonomial- Parameters:
factory- theNumberFactoryused for this operationprimitive- thePrimitivewhich must have same type as this; it is possible the primitive does not occur at all in this, in which case the result is 0- Returns:
- The
IntegerNumberrepresents the maximum degree to whichprimitiveoccurs in this
-
getTruePrimitives
Description copied from interface:MonomialReturns thePrimitives which are notPolynomials occurring in thisMonomial. These are essentially the "variables" occurring in the polynomial expression.- Specified by:
getTruePrimitivesin interfaceMonomial- Returns:
- the set of primitives that are not polynomials occurring herein
-