public class TwoDimensionalMesh<S extends Solution<?>> extends Object implements Neighborhood<S>
| Constructor and Description |
|---|
TwoDimensionalMesh(int rows,
int columns,
int[][] neighborhood)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
List<S> |
getNeighbors(List<S> solutionList,
int solutionPosition)
Returns the north,south, east, and west solutions of a given solution
|
public TwoDimensionalMesh(int rows,
int columns,
int[][] neighborhood)
public List<S> getNeighbors(List<S> solutionList, int solutionPosition)
getNeighbors in interface Neighborhood<S extends Solution<?>>solutionList - the solution set from where the neighbors are takensolutionPosition - Represents the position of the solutionCopyright © 2017. All rights reserved.