public class MacRevised.NoGood extends Object implements AssignmentContext
Constructor and Description |
---|
NoGood(Assignment<V,T> assignment) |
Modifier and Type | Method and Description |
---|---|
Set<T> |
explanation(Assignment<V,T> assignment,
Constraint<V,T> constraint,
T value,
V variable) |
Set<T> |
getNoGood(T value) |
Set<T>[] |
getNoGood(V variable) |
Set<T> |
goodValues(V variable)
good values of a variable (values not removed from variables domain)
|
boolean |
hasSupport(Assignment<V,T> assignment,
Constraint<V,T> constraint,
T value,
V variable) |
boolean |
isGood(T value)
is variable good
|
Set<T> |
noGood(T value)
variables explanation
|
void |
propagate(Assignment<V,T> assignment,
Constraint<V,T> constraint,
T noGoodValue,
List<T> queue) |
void |
propagate(Assignment<V,T> assignment,
List<T> queue) |
boolean |
revise(Assignment<V,T> assignment,
Constraint<V,T> constraint,
T value) |
boolean |
revise(Assignment<V,T> assignment,
T value) |
protected void |
setGood(T value)
sets value to be good
|
void |
setNoGood(Assignment<V,T> assignment,
T value,
Set<T> reason)
sets value's explanation
|
void |
setNoGood(T value,
Set<T> noGood) |
void |
setNoGood(V variable,
Set<T>[] noGood) |
Set<T> |
supports(Assignment<V,T> assignment,
Constraint<V,T> constraint,
T value,
V variable) |
public NoGood(Assignment<V,T> assignment)
public Set<T> goodValues(V variable)
variable
- given variablepublic Set<T> noGood(T value)
value
- given valuepublic boolean isGood(T value)
value
- given valuepublic void propagate(Assignment<V,T> assignment, Constraint<V,T> constraint, T noGoodValue, List<T> queue)
public boolean revise(Assignment<V,T> assignment, T value)
public boolean revise(Assignment<V,T> assignment, Constraint<V,T> constraint, T value)
public Set<T> explanation(Assignment<V,T> assignment, Constraint<V,T> constraint, T value, V variable)
public Set<T> supports(Assignment<V,T> assignment, Constraint<V,T> constraint, T value, V variable)
public boolean hasSupport(Assignment<V,T> assignment, Constraint<V,T> constraint, T value, V variable)