RepastHPC 1.0
Public Member Functions | Protected Attributes
repast::Grid2DQuery< T > Class Template Reference

Base class for neighborhood queries on discrete Grids. More...

#include <Grid2DQuery.h>

Inheritance diagram for repast::Grid2DQuery< T >:
repast::Moore2DGridQuery< T > repast::VN2DGridQuery< T >

List of all members.

Public Member Functions

 Grid2DQuery (const Grid< T, int > *grid)
 Creates Grid2DQuery that will query the specified Grid.
virtual void query (const Point< int > &center, 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]

Detailed Description

template<typename T>
class repast::Grid2DQuery< T >

Base class for neighborhood queries on discrete Grids.

Template Parameters:
Tthe type of object in the Grid.

Member Function Documentation

template<typename T >
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.

Parameters:
centerthe center of the neighborhood
rangethe range of the neighborhood out from the center
includeCenterwhether or not to include any agents at the center
[out]theneighboring agents will be returned in this vector

Implemented in repast::Moore2DGridQuery< T >, and repast::VN2DGridQuery< T >.


The documentation for this class was generated from the following file:
 All Classes Functions Typedefs Enumerations Friends