|
RepastHPC 1.0
|
Base class for neighborhood queries on discrete Grids. More...
#include <Grid2DQuery.h>
Public Member Functions | |
| Grid2DQuery (const Grid< T, int > *grid) | |
| Creates Grid2DQuery that will query the specified Grid. | |
| virtual void | query (const Point< int > ¢er, int range, bool includeCenter, std::vector< T * > &out) const =0 |
| Queries the Grid for the neighbors surrounding the center point within a specified range. | |
Protected Attributes | |
| const Grid< T, int > * | _grid |
| int | minMax [2][2] |
Base class for neighborhood queries on discrete Grids.
| T | the type of object in the Grid. |
| virtual void repast::Grid2DQuery< T >::query | ( | const Point< int > & | center, |
| int | range, | ||
| bool | includeCenter, | ||
| std::vector< T * > & | out | ||
| ) | const [pure virtual] |
Queries the Grid for the neighbors surrounding the center point within a specified range.
What constitutes the neighborhood is determines by subclass implementors.
| center | the center of the neighborhood | |
| range | the range of the neighborhood out from the center | |
| includeCenter | whether or not to include any agents at the center | |
| [out] | the | neighboring agents will be returned in this vector |
Implemented in repast::Moore2DGridQuery< T >, and repast::VN2DGridQuery< T >.
1.7.4