Package repast.simphony.query.space.grid
Class GridCellNgh<T>
java.lang.Object
repast.simphony.query.space.grid.GridCellNgh<T>
Retrieves the MooreNeighborhood around a particular GridPoint.
The neighborhood is represented as a List of GridCell-s.
- Author:
- Nick Collier
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetNeighborhood
(boolean includeCenter) Gets the neighborhood of GridCells.
-
Field Details
-
grid
-
extent
protected int[] extent -
dims
-
mins
protected int[] mins -
maxs
protected int[] maxs -
clazz
-
-
Constructor Details
-
GridCellNgh
Creates a GridCellNgh using the specified grid, point, type and extent.- Parameters:
grid
- the grid that contains the neighborhoodpoint
- the central point of the neighborhoodclazz
- the type of objects we want to get in the neighborhood. Objects not of this type will not be in the neighborhood listextent
- the extent of the neighborhood in each dimension
-
-
Method Details
-
getNeighborhood
Gets the neighborhood of GridCells.- Parameters:
includeCenter
- if true then the center, i.e the point GridCell will also be returned.- Returns:
- a list of GridCells that make up the neighborhood.
-