44 #include "AbstractRelogoAgent.h"
45 #include "RelogoDiscreteSpaceAdder.h"
47 #include "repast_hpc/Moore2DGridQuery.h"
48 #include "repast_hpc/VN2DGridQuery.h"
75 return (
int) _location[0];
82 return (
int) _location[1];
93 template<
typename PatchType>
104 template<
typename PatchType>
114 template<
typename PatchType>
125 template<
typename PatchType>
130 template<
typename PatchType>
137 template<
typename PatchType>
144 template<
typename PatchType>
146 std::vector<RelogoAgent*> vec;
151 filterVecToSet(vec, out, PATCH_TYPE_ID);
154 template<
typename PatchType>
156 std::vector<RelogoAgent*> vec;
160 filterVecToSet(vec, out, PATCH_TYPE_ID);
Neighborhood query that gathers neighbors in a Moore (N, S, E, W, NE, etc.) neighborhood.
Definition: Moore2DGridQuery.h:58
Abstract base class for turtles and patches.
Definition: AbstractRelogoAgent.h:55
Agent identity information.
Definition: AgentId.h:60
virtual int pxCor() const
Gets the patch x coordinate of this patch's location.
Definition: Patch.h:74
Specialized indexable collection class for agents.
Definition: AgentSet.h:82
const RelogoGridType * grid()
Gets the grid managed by this Observer.
Definition: Observer.cpp:154
virtual void query(const Point< int > ¢er, int range, bool includeCenter, std::vector< T * > &out) const
Queries the Grid for the Von Neumann neighbors surrounding the center point within a specified range.
Definition: VN2DGridQuery.h:81
Patch(repast::AgentId id, Observer *observer)
Creates a Patch that will have the specified id and be managed by the specified Observer.
Definition: Patch.cpp:48
AgentSet< PatchType > neighbors4()
Gets the 4 (Von Neumann neighborhood) neighboring Patches of this Patch.
Definition: Patch.h:138
Neighborhood query that gathers neighbors in a Von Neumann (N, S, E, W) neighborhood.
Definition: VN2DGridQuery.h:56
AgentSet< PatchType > neighbors()
Gets the 8 (Moore neighborhood) neighboring Patches of this Patch.
Definition: Patch.h:131
virtual void query(const Point< int > ¢er, int range, bool includeCenter, std::vector< T * > &out) const
Queries the Grid for the Moore neighbors surrounding the center point within a specified range.
Definition: Moore2DGridQuery.h:86
Implementation of a logo Observer.
Definition: Observer.h:110
A logo patch.
Definition: Patch.h:58
virtual int pyCor() const
Gets the patch y coordinate of this patch's location.
Definition: Patch.h:81