public class ExamRoomSwapNeighbour extends Object implements Neighbour<Exam,ExamPlacement>
Constructor and Description |
---|
ExamRoomSwapNeighbour(Assignment<Exam,ExamPlacement> assignment,
ExamPlacement placement,
ExamRoomPlacement current,
ExamRoomPlacement swap) |
Modifier and Type | Method and Description |
---|---|
void |
assign(Assignment<Exam,ExamPlacement> assignment,
long iteration)
Perform assignment
|
Map<Exam,ExamPlacement> |
assignments()
Return assignments to be done.
|
boolean |
canDo() |
String |
toString() |
protected static String |
toString(double[] x,
double[] y) |
double |
value(Assignment<Exam,ExamPlacement> assignment)
Difference in the evaluation function, if this neighnour is assigned.
|
public ExamRoomSwapNeighbour(Assignment<Exam,ExamPlacement> assignment, ExamPlacement placement, ExamRoomPlacement current, ExamRoomPlacement swap)
public boolean canDo()
public void assign(Assignment<Exam,ExamPlacement> assignment, long iteration)
Neighbour
assign
in interface Neighbour<Exam,ExamPlacement>
assignment
- current assignmentiteration
- current iterationpublic double value(Assignment<Exam,ExamPlacement> assignment)
Neighbour
value
in interface Neighbour<Exam,ExamPlacement>
assignment
- current assignmentpublic Map<Exam,ExamPlacement> assignments()
Neighbour
assignments
in interface Neighbour<Exam,ExamPlacement>