public abstract class Constant extends Term
Constructor and Description |
---|
Constant() |
Modifier and Type | Method and Description |
---|---|
void |
collapseAssociativeOperations()
This method collapses all associative operations appearing
in this term, e.g.
|
Term |
derive(Variable v)
Differentiates the term with respect to the given variable.
|
void |
expandAssociativeOperations()
This method expands all associative operations appearing
in this term, e.g.
|
java.util.Set<AbsoluteValue> |
getAbsoluteValues()
Returns all absolute values of this term.
|
java.util.Set<Maximum> |
getMaximums()
Returns all maximums of this term.
|
java.util.Set<Minimum> |
getMinimums()
Returns all minimums of this term.
|
java.util.Set<Product> |
getProducts()
Returns all products of this term.
|
java.util.Set<Variable> |
getVariables()
Returns all variables in this term.
|
boolean |
isContinuous(Variable v)
Checks whether this term is continuous in v.
|
Term |
replaceTerm(Term toSubstitute,
Term substitution)
Replaces each occurrence of "toSubstitute" by "substitution" and
return the new term.
|
Term |
simplify()
Simplifies this term in an equivalent way:
- Replaces products that contain a zero by the constant zero - Removes a term one from products - Removes a term zero from sums - Aggregates constants in sums, products, and minimums - Evaluates functional terms on constants - Simplifies fractions where possible. |
Sum |
toLinearForm()
Converts this term into a linear normal form, i.e.
|
Constant |
value()
Computes the actual value of this term if it contains no variables.
|
add, doubleValue, evaluateMatrix, evaluateVector, evaluateVector, isContinuous, isInteger, isLinear, min, minus, mult, replaceAllTerms, replaceAllTerms, toString
public Constant value()
Term
public java.util.Set<Variable> getVariables()
Term
getVariables
in class Term
public java.util.Set<Product> getProducts()
Term
getProducts
in class Term
public java.util.Set<Minimum> getMinimums()
Term
getMinimums
in class Term
public java.util.Set<Maximum> getMaximums()
Term
getMaximums
in class Term
public java.util.Set<AbsoluteValue> getAbsoluteValues()
Term
getAbsoluteValues
in class Term
public void collapseAssociativeOperations()
Term
collapseAssociativeOperations
in class Term
public void expandAssociativeOperations()
Term
expandAssociativeOperations
in class Term
public Term simplify()
Term
public Sum toLinearForm() throws java.lang.IllegalArgumentException
Term
toLinearForm
in class Term
java.lang.IllegalArgumentException
- if this term cannot be
converted into a linear normal form.public Term derive(Variable v)
Term
public boolean isContinuous(Variable v)
Term
isContinuous
in class Term
public Term replaceTerm(Term toSubstitute, Term substitution)
Term
replaceTerm
in class Term
toSubstitute
- the term to be substitutedsubstitution
- the new term