Package net.sf.tweety.math.term
Class FunctionalTerm
- java.lang.Object
-
- net.sf.tweety.math.term.Term
-
- net.sf.tweety.math.term.FunctionalTerm
-
-
Constructor Summary
Constructors Constructor Description FunctionalTerm(Term term)
Creates a new functional term with the given inner term.
-
Method Summary
Modifier and Type Method Description void
collapseAssociativeOperations()
This method collapses all associative operations appearing in this term, e.g.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.Term
getTerm()
Returns the inner term.java.util.Set<Variable>
getVariables()
Returns all variables in this term.boolean
isInteger()
Checks whether this term represents an integer value.abstract Term
replaceTerm(Term toSubstitute, Term substitution)
Replaces each occurrence of "toSubstitute" by "substitution" and return the new term.Sum
toLinearForm()
Converts this term into a linear normal form, i.e.abstract java.lang.String
toString()
abstract Constant
value()
Computes the actual value of this term if it contains no variables.-
Methods inherited from class net.sf.tweety.math.term.Term
add, derive, doubleValue, evaluateMatrix, evaluateVector, evaluateVector, isContinuous, isContinuous, isLinear, min, minus, mult, replaceAllTerms, replaceAllTerms, simplify
-
-
-
-
Constructor Detail
-
FunctionalTerm
public FunctionalTerm(Term term)
Creates a new functional term with the given inner term.- Parameters:
term
- a term
-
-
Method Detail
-
getTerm
public Term getTerm()
Returns the inner term.- Returns:
- the inner term.
-
collapseAssociativeOperations
public void collapseAssociativeOperations()
Description copied from class:Term
This method collapses all associative operations appearing in this term, e.g. every min{min{a,b},c} becomes min{a,b,c}.- Specified by:
collapseAssociativeOperations
in classTerm
-
expandAssociativeOperations
public void expandAssociativeOperations()
Description copied from class:Term
This method expands all associative operations appearing in this term, e.g. every min{a,b,c} becomes min{min{a,b},c}.- Specified by:
expandAssociativeOperations
in classTerm
-
getMinimums
public java.util.Set<Minimum> getMinimums()
Description copied from class:Term
Returns all minimums of this term.- Specified by:
getMinimums
in classTerm
- Returns:
- all minimums of this term.
-
getMaximums
public java.util.Set<Maximum> getMaximums()
Description copied from class:Term
Returns all maximums of this term.- Specified by:
getMaximums
in classTerm
- Returns:
- all maximums of this term.
-
getProducts
public java.util.Set<Product> getProducts()
Description copied from class:Term
Returns all products of this term.- Specified by:
getProducts
in classTerm
- Returns:
- all products of this term.
-
getVariables
public java.util.Set<Variable> getVariables()
Description copied from class:Term
Returns all variables in this term.- Specified by:
getVariables
in classTerm
- Returns:
- all variables in this term.
-
getAbsoluteValues
public java.util.Set<AbsoluteValue> getAbsoluteValues()
Description copied from class:Term
Returns all absolute values of this term.- Specified by:
getAbsoluteValues
in classTerm
- Returns:
- all absolute values of this term.
-
isInteger
public boolean isInteger()
Description copied from class:Term
Checks whether this term represents an integer value.
-
toLinearForm
public Sum toLinearForm() throws java.lang.IllegalArgumentException
Description copied from class:Term
Converts this term into a linear normal form, i.e. into a sum of products of a constant and a variable.- Specified by:
toLinearForm
in classTerm
- Returns:
- a term in linear normal form.
- Throws:
java.lang.IllegalArgumentException
- if this term cannot be converted into a linear normal form.
-
replaceTerm
public abstract Term replaceTerm(Term toSubstitute, Term substitution)
Description copied from class:Term
Replaces each occurrence of "toSubstitute" by "substitution" and return the new term.- Specified by:
replaceTerm
in classTerm
- Parameters:
toSubstitute
- the term to be substitutedsubstitution
- the new term- Returns:
- this term where "toSubstitute" is replaced by "substitution"
-
-