V
- VariableT
- Valuepublic class SimpleNeighbour<V extends Variable<V,T>,T extends Value<V,T>> extends Object implements Neighbour<V,T>
NeighbourSelection
Constructor and Description |
---|
SimpleNeighbour(V variable,
T value)
Model
|
SimpleNeighbour(V variable,
T value,
Set<T> conflicts) |
Modifier and Type | Method and Description |
---|---|
void |
assign(Assignment<V,T> assignment,
long iteration)
Perform assignment
|
Map<V,T> |
assignments()
Return assignments to be done.
|
T |
getValue()
Selected value
|
V |
getVariable()
Selected variable
|
String |
toString() |
double |
value(Assignment<V,T> assignment)
Improvement in the solution value if this neighbour is accepted.
|
public SimpleNeighbour(V variable, T value)
variable
- variable to be assignedvalue
- value to be assigned to the given variable, null if the
variable should be unassignedpublic SimpleNeighbour(V variable, T value, Set<T> conflicts)
public V getVariable()
public T getValue()
public void assign(Assignment<V,T> assignment, long iteration)
public double value(Assignment<V,T> assignment)