public class ConstraintSatisfactionProblem extends java.util.HashSet<Statement>
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
For serialization.
|
Constructor and Description |
---|
ConstraintSatisfactionProblem()
Creates a new and empty csp.
|
ConstraintSatisfactionProblem(java.util.Collection<? extends Statement> statements)
Creates a new csp with the given statements
|
Modifier and Type | Method and Description |
---|---|
ConstraintSatisfactionProblem |
clone() |
void |
collapseAssociativeOperations()
This method collapses all associative operations appearing
in the target function and the constraints, e.g.
|
java.util.Set<Minimum> |
getMinimums()
Returns all minimums appearing in this problem.
|
java.util.Set<Variable> |
getVariables()
Returns all variables of this problem.
|
boolean |
isInteger()
Checks whether this problem is integer, i.e.
|
boolean |
isLinear()
Checks whether every constraint of this problem is linear.
|
boolean |
isMinimumFree()
Checks whether this problem uses no minimum function.
|
void |
resolveMaximums()
Resolves all occurrences of maximums by substituting
a maximum "max{a,b}" by "0.5 a + 0.5 b + abs(a-b)".
|
void |
resolveMinimums()
Resolves all occurrences of minimums by substituting
a minimum "min{a,b}" by "0.5 a + 0.5 b - abs(a-b)".
|
ConstraintSatisfactionProblem |
toNormalizedForm()
Normalizes this problem, i.e.
|
java.lang.String |
toString() |
add, clear, contains, isEmpty, iterator, remove, size, spliterator
addAll, containsAll, retainAll, toArray, toArray
finalize, getClass, notify, notifyAll, wait, wait, wait
private static final long serialVersionUID
public ConstraintSatisfactionProblem()
public ConstraintSatisfactionProblem(java.util.Collection<? extends Statement> statements)
statements
- a collection of statements.public ConstraintSatisfactionProblem toNormalizedForm()
public boolean isLinear()
public boolean isInteger()
public boolean isMinimumFree()
public void resolveMinimums()
public void resolveMaximums()
public java.util.Set<Variable> getVariables()
public java.util.Set<Minimum> getMinimums()
public void collapseAssociativeOperations()
public java.lang.String toString()
toString
in class java.util.AbstractCollection<Statement>
public ConstraintSatisfactionProblem clone()
clone
in class java.util.HashSet<Statement>