Class TwoDimensionalMesh<S>

java.lang.Object
org.uma.jmetal.util.neighborhood.util.TwoDimensionalMesh<S>
All Implemented Interfaces:
Serializable, Neighborhood<S>
Direct Known Subclasses:
C25, C49, C9, L13, L25, L41, L5

public class TwoDimensionalMesh<S> extends Object implements Neighborhood<S>
Class defining a bi-dimensional mesh.
See Also:
  • Constructor Details

    • TwoDimensionalMesh

      public TwoDimensionalMesh(int rows, int columns, int[][] neighborhood)
      Constructor. Defines a neighborhood for list of solutions
  • Method Details

    • getNeighbors

      public List<S> getNeighbors(List<S> solutionList, int solutionPosition)
      Returns the north,south, east, and west solutions of a given solution
      Specified by:
      getNeighbors in interface Neighborhood<S>
      Parameters:
      solutionList - the solution set from where the neighbors are taken
      solutionPosition - Represents the position of the solution