Class FunctionalTerm
java.lang.Object
org.tweetyproject.math.term.Term
org.tweetyproject.math.term.FunctionalTerm
- Direct Known Subclasses:
AbsoluteValue,Exp,Logarithm,Power,Root
Instances of this class represent a functional term on some inner term.
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorsConstructorDescriptionFunctionalTerm(Term term) Creates a new functional term with the given inner term. -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method collapses all associative operations appearing in this term, e.g.voidThis method expands all associative operations appearing in this term, e.g.Returns all absolute values of this term.Returns all maximums of this term.Returns all minimums of this term.Returns all products of this term.getSums()Returns all sums of this term.getTerm()Returns the inner term.Returns all variables in this term.booleanChecks whether this term represents an integer value.booleanisLinear()Checks whether this term is linear.abstract TermreplaceTerm(Term toSubstitute, Term substitution) Replaces each occurrence of "toSubstitute" by "substitution" and return the new term.Converts this term into a linear normal form, i.e.Return a quadratic formabstract StringtoString()abstract Constantvalue()Computes the actual value of this term if it contains no variables.Methods inherited from class org.tweetyproject.math.term.Term
add, derive, doubleValue, evaluateMatrix, evaluateVector, evaluateVector, getTerms, isContinuous, isContinuous, isQuadratic, min, minus, mult, replaceAllTerms, replaceAllTerms, simplify
-
Constructor Details
-
FunctionalTerm
Creates a new functional term with the given inner term.- Parameters:
term- a term
-
-
Method Details
-
getTerm
-
collapseAssociativeOperations
public void collapseAssociativeOperations()Description copied from class:TermThis method collapses all associative operations appearing in this term, e.g. every min{min{a,b},c} becomes min{a,b,c}.- Specified by:
collapseAssociativeOperationsin classTerm
-
expandAssociativeOperations
public void expandAssociativeOperations()Description copied from class:TermThis method expands all associative operations appearing in this term, e.g. every min{a,b,c} becomes min{min{a,b},c}.- Specified by:
expandAssociativeOperationsin classTerm
-
getMinimums
Description copied from class:TermReturns all minimums of this term.- Specified by:
getMinimumsin classTerm- Returns:
- all minimums of this term.
-
getMaximums
Description copied from class:TermReturns all maximums of this term.- Specified by:
getMaximumsin classTerm- Returns:
- all maximums of this term.
-
getProducts
Description copied from class:TermReturns all products of this term.- Specified by:
getProductsin classTerm- Returns:
- all products of this term.
-
getSums
-
getVariables
Description copied from class:TermReturns all variables in this term.- Specified by:
getVariablesin classTerm- Returns:
- all variables in this term.
-
getAbsoluteValues
Description copied from class:TermReturns all absolute values of this term.- Specified by:
getAbsoluteValuesin classTerm- Returns:
- all absolute values of this term.
-
isInteger
-
toLinearForm
Description copied from class:TermConverts this term into a linear normal form, i.e. into a sum of products of a constant and a variable.- Specified by:
toLinearFormin classTerm- Returns:
- a term in linear normal form.
- Throws:
IllegalArgumentException- if this term cannot be converted into a linear normal form.
-
toQuadraticForm
Description copied from class:TermReturn a quadratic form- Specified by:
toQuadraticFormin classTerm- Returns:
- a quadratic form
- Throws:
IllegalArgumentException- error
-
replaceTerm
Description copied from class:TermReplaces each occurrence of "toSubstitute" by "substitution" and return the new term.- Specified by:
replaceTermin classTerm- Parameters:
toSubstitute- the term to be substitutedsubstitution- the new term- Returns:
- this term where "toSubstitute" is replaced by "substitution"
-
toString
-
isLinear
-
value
Description copied from class:TermComputes the actual value of this term if it contains no variables.- Specified by:
valuein classTerm- Returns:
- the value of this term, either a float or an integer.
- Throws:
IllegalArgumentException- if this term contains at least on variable.
-