Class AdaptiveRandomNeighborhood<S>
java.lang.Object
org.uma.jmetal.util.neighborhood.impl.AdaptiveRandomNeighborhood<S>
- All Implemented Interfaces:
Serializable,Neighborhood<S>
This class implements the adaptive random neighborhood (topology) defined by M. Clerc.
Each 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).
- Author:
- Antonio J. Nebro
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.uma.jmetal.util.neighborhood.Neighborhood
Neighborhood.NeighborType -
Constructor Summary
ConstructorsConstructorDescriptionAdaptiveRandomNeighborhood(int solutionListSize, int numberOfRandomNeighbours) ConstructorAdaptiveRandomNeighborhood(int solutionListSize, int numberOfRandomNeighbours, BoundedRandomGenerator<Integer> randomGenerator) Constructor -
Method Summary
-
Constructor Details
-
AdaptiveRandomNeighborhood
public AdaptiveRandomNeighborhood(int solutionListSize, int numberOfRandomNeighbours) Constructor- Parameters:
solutionListSize- The expected size of the list of solutionsnumberOfRandomNeighbours- The number of neighbors per solution
-
AdaptiveRandomNeighborhood
public AdaptiveRandomNeighborhood(int solutionListSize, int numberOfRandomNeighbours, BoundedRandomGenerator<Integer> randomGenerator) Constructor- Parameters:
solutionListSize- The expected size of the list of solutionsnumberOfRandomNeighbours- The number of neighbors per solutionrandomGenerator- theBoundedRandomGeneratorto use for the randomisation
-
-
Method Details
-
recompute
public void recompute()Recomputes the neighbors -
getNeighbors
- Specified by:
getNeighborsin interfaceNeighborhood<S>
-