jopt.csp.search
Class CurrentNeighbor

java.lang.Object
  extended byjopt.csp.search.CurrentNeighbor

public class CurrentNeighbor
extends java.lang.Object

Used to hold a neighboring solution and the neighborhood that produced it. This is used when browsing a neighborhood to maintain which neighbor is currently active in the solver.

Version:
$Revision: 1.3 $
Author:
Nick Coleman

Constructor Summary
CurrentNeighbor()
           
 
Method Summary
 int getIndex()
           
 Metaheuristic getMetaheuristic()
           
 Neighborhood getNeighborhood()
           
 SolverSolution getSolution()
           
 void setIndex(int index)
          Sets the index of the neighboring solution within the neighborhood
 void setMetaheuristic(Metaheuristic metaheuristic)
          Sets the metaheuristic that determines neighbors to be valid
 void setNeighborhood(Neighborhood hood)
          Sets the neighborhood that generated this neighbor
 void setSolution(SolverSolution solution)
          Sets a neighboring solution that was produced by the neighborhood
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurrentNeighbor

public CurrentNeighbor()
Method Detail

getNeighborhood

public Neighborhood getNeighborhood()
Returns:
Returns the neighborhood that generated this neighbor.

setNeighborhood

public void setNeighborhood(Neighborhood hood)
Sets the neighborhood that generated this neighbor


getSolution

public SolverSolution getSolution()
Returns:
Returns a neighboring solution that was produced by the neighborhood.

setSolution

public void setSolution(SolverSolution solution)
Sets a neighboring solution that was produced by the neighborhood


getIndex

public int getIndex()
Returns:
Returns the index of the neighboring solution within the neighborhood.

setIndex

public void setIndex(int index)
Sets the index of the neighboring solution within the neighborhood


getMetaheuristic

public Metaheuristic getMetaheuristic()
Returns:
Returns the metaheuristic that determined the neighbor to be valid

setMetaheuristic

public void setMetaheuristic(Metaheuristic metaheuristic)
Sets the metaheuristic that determines neighbors to be valid