|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jopt.csp.spi.search.localsearch.FlipNeighborhood
Creates a neighbor hood that is useful for flipping 0 and 1 values on binary variables. For each variable defined, a neighboring solution will be defined that either assigns the value to 1 or the value to 0.
BrowseNeighborhoodAction
Constructor Summary | |
FlipNeighborhood(jopt.csp.variable.CspIntVariable[] vars)
Creates a flip neighborhood base on an array of binary variables |
Method Summary | |
jopt.csp.solution.SolverSolution |
getNeighbor(int i)
|
jopt.csp.search.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)
|
void |
setInitialSolution(jopt.csp.solution.SolverSolution initial)
|
int |
size()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FlipNeighborhood(jopt.csp.variable.CspIntVariable[] vars)
Method Detail |
public void setInitialSolution(jopt.csp.solution.SolverSolution initial)
setInitialSolution
in interface jopt.csp.search.Neighborhood
public int size()
size
in interface jopt.csp.search.Neighborhood
public jopt.csp.solution.SolverSolution getNeighbor(int i)
getNeighbor
in interface jopt.csp.search.Neighborhood
public void neighborSelected(int i)
neighborSelected
in interface jopt.csp.search.Neighborhood
public jopt.csp.search.Neighborhood getSelectedNeighborhood()
getSelectedNeighborhood
in interface jopt.csp.search.Neighborhood
public int getSelectedNeighborhoodOffset()
getSelectedNeighborhoodOffset
in interface jopt.csp.search.Neighborhood
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |