Class Statement
java.lang.Object
org.tweetyproject.math.term.OptProbElement
org.tweetyproject.math.equation.Statement
- Direct Known Subclasses:
- Equation,- Inequation
This class models a mathematical statement, i.e. an equality or an inequality.
- Author:
- Matthias Thimm
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidThis method collapses all associative operations appearing in this statement, e.g.voidThis method expands all associative operations appearing in this statement, e.g.Returns all absolute values of this statement.Returns the left term of this statement.Returns all maximums of this statement.Returns all minimums of this statement.abstract StringReturns the relation symbol of this statement.Returns the right term of this statement.abstract booleanChecks whether this constraint is of normalized form, i.e.abstract booleanchecks if a Statement fulfills the relationreplaceAllTerms(Map<? extends Term, ? extends Term> substitutes) Replaces terms according to the given map.abstract StatementreplaceTerm(Term toSubstitute, Term substitution) Replaces each occurrence of "toSubstitute" by "substitution" and return the new statement.voidsetLeftTerm(Term t) Sets the left term of this statement.voidsetRightTerm(Term t) Sets the right term of this statement.abstract StatementBrings both terms into linear form.abstract StatementNormalizes this constraint, i.e.toString()
- 
Constructor Details- 
Statement
 
- 
- 
Method Details- 
getLeftTermReturns the left term of this statement.- Returns:
- the left term of this statement.
 
- 
getMinimums
- 
getMaximums
- 
getAbsoluteValuesReturns all absolute values of this statement.- Returns:
- all absolute values of this statement.
 
- 
replaceTermReplaces each occurrence of "toSubstitute" by "substitution" and return the new statement.- Parameters:
- toSubstitute- the term to be substituted
- substitution- the new term
- Returns:
- this statement where "toSubstitute" is replaced by "substitution"
 
- 
replaceAllTerms
- 
isNormalizedpublic abstract boolean isNormalized()Checks whether this constraint is of normalized form, i.e. whether it has the form "T > 0" or "T >= 0", "T = 0" or "T != 0"- Returns:
- "true" iff this constraint is normalized.
 
- 
toNormalizedFormNormalizes this constraint, i.e. brings it into an equivalent form "T > 0" or "T >= 0", "T = 0" or "T != 0".- Returns:
- a statement.
 
- 
toLinearFormBrings both terms into linear form. If this constraint is normalized (i.e. the right term consists of the constant 0) the right term is not linearized.- Returns:
- a statement.
 
- 
collapseAssociativeOperationspublic void collapseAssociativeOperations()This method collapses all associative operations appearing in this statement, e.g. every min{min{a,b},c} becomes min{a,b,c}
- 
expandAssociativeOperationspublic void expandAssociativeOperations()This method expands all associative operations appearing in this statement, e.g. every min{a,b,c} becomes min{min{a,b},c}.
- 
getRightTermReturns the right term of this statement.- Returns:
- the right term of this statement.
 
- 
setLeftTerm
- 
setRightTerm
- 
isValidchecks if a Statement fulfills the relation- Parameters:
- s- a Statement with values for all variables
- Returns:
- if the left and the right hand side are in the correct relation to each other
 
- 
getRelationSymbolReturns the relation symbol of this statement.- Returns:
- the relation symbol of this statement.
 
- 
toString
 
-