41 #ifndef GRID2DQUERY_H_
42 #define GRID2DQUERY_H_
44 #include "RepastErrors.h"
77 virtual void query(
const Point<int>& center,
int range,
bool includeCenter, std::vector<T*>& out)
const = 0;
83 if (grid->bounds().dimensionCount() != 2)
84 throw Repast_Error_10(grid->bounds().dimensionCount());
88 for (
size_t i = 0; i < 2; i++) {
89 int origin = bounds.
origin(i);
90 minMax[i][0] = origin;
const Point< double > & extents() const
Gets the extents along each dimension.
Definition: GridDimensions.h:90
Grid2DQuery(const Grid< T, int > *grid)
Creates Grid2DQuery that will query the specified Grid.
Definition: Grid2DQuery.h:81
Base class for neighborhood queries on discrete Grids.
Definition: Grid2DQuery.h:54
const Point< double > & origin() const
Gets the origin.
Definition: GridDimensions.h:83
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.
Basic structure for specifying grid dimenions.
Definition: GridDimensions.h:58