Multiple Occupancy cell accessor for accessing the occupants of locations in a Grid.
More...
#include <MultipleOccupancy.h>
|
T * | get (const Point< GPType > &location) const |
| Gets the first object found at the specified location. More...
|
|
void | getAll (const Point< GPType > &location, std::vector< T * > &out) const |
| Gets all the items found at the specified location. More...
|
|
bool | put (boost::shared_ptr< T > &agent, const Point< GPType > &location) |
| Puts the specified item at the specified location. More...
|
|
void | remove (boost::shared_ptr< T > &agent, const Point< GPType > &location) |
| Removes the specified item from the specified location. More...
|
|
template<typename T, typename GPType>
class repast::MultipleOccupancy< T, GPType >
Multiple Occupancy cell accessor for accessing the occupants of locations in a Grid.
Each locations can have multiple occupants.
- Parameters
-
T | the type of object in the Grid |
GPType | the coordinate type of the grid point locations. This must be an int or a double. |
◆ get()
template<typename T , typename GPType >
Gets the first object found at the specified location.
- Parameters
-
location | the location to get the object at |
- Returns
- the first object found at the specified location or 0 if there are no objects at the specified location.
◆ getAll()
template<typename T , typename GPType >
Gets all the items found at the specified location.
- Parameters
-
| location | the location to get the items at |
[out] | the | found items will be returned in this vector |
◆ put()
template<typename T , typename GPType >
Puts the specified item at the specified location.
- Parameters
-
agent | the item to put |
location | the location to put the item at |
◆ remove()
template<typename T , typename GPType >
Removes the specified item from the specified location.
- Parameters
-
agent | the item to remove |
location | the location to remove the item from |
The documentation for this class was generated from the following file: