Class AdaptiveRandomNeighborhood<S>

java.lang.Object
org.uma.jmetal.util.neighborhood.impl.AdaptiveRandomNeighborhood<S>
All Implemented Interfaces:
Serializable, Neighborhood<S>

public class AdaptiveRandomNeighborhood<S> extends Object implements 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 <antonio@lcc.uma.es>
See Also:
  • Constructor Details

    • AdaptiveRandomNeighborhood

      public AdaptiveRandomNeighborhood(int solutionListSize, int numberOfRandomNeighbours)
      Constructor
      Parameters:
      solutionListSize - The expected size of the list of solutions
      numberOfRandomNeighbours - 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 solutions
      numberOfRandomNeighbours - The number of neighbors per solution
      randomGenerator - the BoundedRandomGenerator to use for the randomisation
  • Method Details

    • recompute

      public void recompute()
      Recomputes the neighbors
    • getNeighbors

      public List<S> getNeighbors(List<S> solutionList, int solutionIndex)
      Specified by:
      getNeighbors in interface Neighborhood<S>