public abstract class LazyNeighbour<V extends Variable<V,T>,T extends Value<V,T>> extends Neighbour<V,T>
LazyNeighbour.LazyNeighbourAcceptanceCriterion
.Modifier and Type | Class and Description |
---|---|
static interface |
LazyNeighbour.LazyNeighbourAcceptanceCriterion<V extends Variable<V,T>,T extends Value<V,T>>
Neighbour acceptance criterion interface (to be implemented
by search strategies that are using
LazyNeighbour . |
Constructor and Description |
---|
LazyNeighbour() |
Modifier and Type | Method and Description |
---|---|
void |
assign(long iteration)
Assign neighbour, check given acceptance criterion, and undo
assignment if the change is not accepted.
|
protected abstract void |
doAssign(long iteration)
Perform assignment
|
abstract Model<V,T> |
getModel()
Return problem model (it is needed in order to be able to get
overall solution value before and after the assignment of this neighbour)
|
void |
setAcceptanceCriterion(LazyNeighbour.LazyNeighbourAcceptanceCriterion<V,T> criterion)
Set acceptance criterion (to be used by a search strategy before the
neighbour is accepted, so that it can be undone if desired)
|
protected abstract void |
undoAssign(long iteration)
Undo assignment
|
double |
value()
Return -1 (neighbour is always accepted).
|
public LazyNeighbour()
public void setAcceptanceCriterion(LazyNeighbour.LazyNeighbourAcceptanceCriterion<V,T> criterion)
public void assign(long iteration)
public double value()
LazyNeighbour.LazyNeighbourAcceptanceCriterion
.protected abstract void doAssign(long iteration)
protected abstract void undoAssign(long iteration)