public class AbsoluteValue extends FunctionalTerm
Constructor and Description |
---|
AbsoluteValue(Term term)
Creates a new absolute value term with the given inner term.
|
Modifier and Type | Method and Description |
---|---|
Term |
derive(Variable v)
Differentiates the term with respect to the given variable.
|
java.util.Set<AbsoluteValue> |
getAbsoluteValues()
Returns all absolute values of 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. |
java.lang.String |
toString() |
Constant |
value()
Computes the actual value of this term if it contains no variables.
|
collapseAssociativeOperations, expandAssociativeOperations, getMaximums, getMinimums, getProducts, getTerm, getVariables, isInteger, toLinearForm
add, doubleValue, evaluateMatrix, evaluateVector, evaluateVector, isContinuous, isLinear, min, minus, mult, replaceAllTerms, replaceAllTerms
public AbsoluteValue(Term term)
term
- a termpublic java.util.Set<AbsoluteValue> getAbsoluteValues()
Term
getAbsoluteValues
in class FunctionalTerm
public Term replaceTerm(Term toSubstitute, Term substitution)
Term
replaceTerm
in class FunctionalTerm
toSubstitute
- the term to be substitutedsubstitution
- the new termpublic Term derive(Variable v) throws NonDifferentiableException
Term
derive
in class Term
v
- a variable.NonDifferentiableException
- if the term cannot be
differentiated.public Term simplify()
Term
public java.lang.String toString()
toString
in class FunctionalTerm
public boolean isContinuous(Variable v)
Term
isContinuous
in class Term
public Constant value() throws java.lang.IllegalArgumentException
Term
value
in class FunctionalTerm
java.lang.IllegalArgumentException
- if this term contains at least on
variable.