net.sf.cpsolver.ifs.heuristics
Class BacktrackNeighbourSelection.BackTrackNeighbour

java.lang.Object
  extended by net.sf.cpsolver.ifs.model.Neighbour
      extended by net.sf.cpsolver.ifs.heuristics.BacktrackNeighbourSelection.BackTrackNeighbour
Enclosing class:
BacktrackNeighbourSelection

public class BacktrackNeighbourSelection.BackTrackNeighbour
extends Neighbour

Backtracking neighbour


Constructor Summary
BacktrackNeighbourSelection.BackTrackNeighbour(Vector resolvedVariables)
          Constructor
 
Method Summary
 void assign(long iteration)
          Assign the neighbour
 int compareTo(Solution solution)
          Compare two neighbours
 Vector getAssignments()
          Neighbour assignments
 double getTotalValue()
          Neighbour value (solution total value if the neighbour is applied).
 String toString()
           
 double value()
          Sum of values of variables from the neighbour that change their values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BacktrackNeighbourSelection.BackTrackNeighbour

public BacktrackNeighbourSelection.BackTrackNeighbour(Vector resolvedVariables)
Constructor

Parameters:
resolvedVariables - variables that has been changed
Method Detail

getTotalValue

public double getTotalValue()
Neighbour value (solution total value if the neighbour is applied).


value

public double value()
Sum of values of variables from the neighbour that change their values

Specified by:
value in class Neighbour

getAssignments

public Vector getAssignments()
Neighbour assignments


assign

public void assign(long iteration)
Assign the neighbour

Specified by:
assign in class Neighbour

compareTo

public int compareTo(Solution solution)
Compare two neighbours


toString

public String toString()
Overrides:
toString in class Object