public class AdaptiveRandomNeighborhood<S extends Solution<?>> extends Object implements Neighborhood<S>
Solution in a solution list must have a neighborhood composed by it itself and
K random selected neighbors (the same solution can be chosen several times).| Constructor and Description |
|---|
AdaptiveRandomNeighborhood(int solutionListSize,
int numberOfRandomNeighbours)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
List<S> |
getNeighbors(List<S> solutionList,
int solutionIndex) |
void |
recompute()
Recomputes the neighbors
|
public AdaptiveRandomNeighborhood(int solutionListSize,
int numberOfRandomNeighbours)
solutionListSize - The expected size of the list of solutionsnumberOfRandomNeighbours - The number of neighbors per solutionpublic void recompute()
public List<S> getNeighbors(List<S> solutionList, int solutionIndex)
getNeighbors in interface Neighborhood<S extends Solution<?>>Copyright © 2017. All rights reserved.