public class Inequation extends Statement
| Modifier and Type | Field and Description |
|---|---|
static int |
GREATER |
static int |
GREATER_EQUAL |
static int |
LESS |
static int |
LESS_EQUAL |
private int |
type |
static int |
UNEQUAL |
| Constructor and Description |
|---|
Inequation(Term leftTerm,
Term rightTerm,
int type)
Creates a new inequation of the given type with the two terms.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getRelationSymbol()
Returns the relation symbol of this statement.
|
int |
getType()
Returns the type of this inequation.
|
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.
|
collapseAssociativeOperations, expandAssociativeOperations, getAbsoluteValues, getLeftTerm, getMaximums, getMinimums, getRightTerm, replaceAllTerms, setLeftTerm, setRightTerm, toStringpublic static final int LESS
public static final int LESS_EQUAL
public static final int GREATER
public static final int GREATER_EQUAL
public static final int UNEQUAL
private int type
public Inequation(Term leftTerm, Term rightTerm, int type)
leftTerm - a term.rightTerm - a term.type - the type of the inequality, one of Inequation.LESS, Inequation.LESS_EQUAL
Inequation.GREATER, Inequation.GREATER_EQUAL, Inequation.UNEQUAL.public Statement replaceTerm(Term toSubstitute, Term substitution)
StatementreplaceTerm in class StatementtoSubstitute - the term to be substitutedsubstitution - the new termpublic int getType()
public boolean isNormalized()
StatementisNormalized in class Statementpublic Statement toNormalizedForm()
StatementtoNormalizedForm in class Statementpublic Statement toLinearForm()
StatementtoLinearForm in class Statementpublic java.lang.String getRelationSymbol()
StatementgetRelationSymbol in class Statement