|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjopt.csp.search.RandomizedNeighborhood
A simple wrapper to other neighborhoods that randomizes the order in which neighbors are obtained.
Constructor Summary | |
RandomizedNeighborhood(Neighborhood hood)
Creates a random neighborhood based on another neighborhood |
|
RandomizedNeighborhood(Neighborhood[] hoods)
Creates a random, unified neighborhood based on a collection of other neighborhoods |
Method Summary | |
SolverSolution |
getNeighbor(int index)
Returns the neighboring solution at index i |
Neighborhood |
getSelectedNeighborhood()
Returns the Neighborhood represented by the latest selected Neighborhood |
int |
getSelectedNeighborhoodOffset()
Returns the offset into Neighborhood represented by the latest selected Neighborhood |
void |
neighborSelected(int i)
Indicates that a neighbor has been selected from this neighborhood and is about to be used to update the initial solution. |
void |
setInitialSolution(SolverSolution initial)
Sets the initial solution to which this neighborhood is related |
int |
size()
Returns the number of potential solutions contained in the neighborhood |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RandomizedNeighborhood(Neighborhood hood)
public RandomizedNeighborhood(Neighborhood[] hoods)
Method Detail |
public void setInitialSolution(SolverSolution initial)
Neighborhood
setInitialSolution
in interface Neighborhood
public int size()
Neighborhood
size
in interface Neighborhood
public SolverSolution getNeighbor(int index)
Neighborhood
i
getNeighbor
in interface Neighborhood
index
- Index of neighbor within neighborhood
public Neighborhood getSelectedNeighborhood()
Neighborhood
getSelectedNeighborhood
in interface Neighborhood
public int getSelectedNeighborhoodOffset()
Neighborhood
getSelectedNeighborhoodOffset
in interface Neighborhood
public void neighborSelected(int i)
Neighborhood
neighborSelected
in interface Neighborhood
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |