Package net.sf.tweety.math.equation
Class Equation
- java.lang.Object
-
- net.sf.tweety.math.equation.Statement
-
- net.sf.tweety.math.equation.Equation
-
public class Equation extends Statement
This class represent an equation of two terms.- Author:
- Matthias Thimm
-
-
Method Summary
Modifier and Type Method Description java.lang.String
getRelationSymbol()
Returns the relation symbol of this statement.boolean
isNormalized()
Checks whether this constraint is of normalized form, i.e.Statement
replaceTerm(Term toSubstitute, Term substitution)
Replaces each occurrence of "toSubstitute" by "substitution" and return the new statement.Statement
toLinearForm()
Brings both terms into linear form.Statement
toNormalizedForm()
Normalizes this constraint, i.e.-
Methods inherited from class net.sf.tweety.math.equation.Statement
collapseAssociativeOperations, expandAssociativeOperations, getAbsoluteValues, getLeftTerm, getMaximums, getMinimums, getRightTerm, replaceAllTerms, setLeftTerm, setRightTerm, toString
-
-
-
-
Method Detail
-
replaceTerm
public Statement replaceTerm(Term toSubstitute, Term substitution)
Description copied from class:Statement
Replaces each occurrence of "toSubstitute" by "substitution" and return the new statement.- Specified by:
replaceTerm
in classStatement
- Parameters:
toSubstitute
- the term to be substitutedsubstitution
- the new term- Returns:
- this statement where "toSubstitute" is replaced by "substitution"
-
isNormalized
public boolean isNormalized()
Description copied from class:Statement
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"- Specified by:
isNormalized
in classStatement
- Returns:
- "true" iff this constraint is normalized.
-
toNormalizedForm
public Statement toNormalizedForm()
Description copied from class:Statement
Normalizes this constraint, i.e. brings it into an equivalent form "T > 0" or "T >= 0", "T = 0" or "T != 0".- Specified by:
toNormalizedForm
in classStatement
- Returns:
- a statement.
-
toLinearForm
public Statement toLinearForm()
Description copied from class:Statement
Brings 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.- Specified by:
toLinearForm
in classStatement
- Returns:
- a statement.
-
getRelationSymbol
public java.lang.String getRelationSymbol()
Description copied from class:Statement
Returns the relation symbol of this statement.- Specified by:
getRelationSymbol
in classStatement
- Returns:
- the relation symbol of this statement.
-
-