Base class for patch.
More...
#include <bases.h>
template<class ENV, class AGENT, class PATCH>
struct Patch< ENV, AGENT, PATCH >
Base class for patch.
Patch class abstracts non-movable discrete elements of the simulation domain.
Definition at line 28 of file bases.h.
◆ Patch() [1/2]
template<class ENV , class AGENT , class PATCH >
◆ ~Patch() [1/2]
template<class ENV , class AGENT , class PATCH >
◆ Patch() [2/2]
template<class ENV , class AGENT , class PATCH >
◆ ~Patch() [2/2]
template<class ENV , class AGENT , class PATCH >
◆ empty() [1/2]
template<class ENV , class AGENT , class PATCH >
◆ empty() [2/2]
template<class ENV , class AGENT , class PATCH >
◆ empty_neighbor() [1/2]
template<class ENV , class AGENT , class PATCH >
shared_ptr<PATCH> Patch< ENV, AGENT, PATCH >::empty_neighbor |
( |
bool |
quiet = false | ) |
|
Returns an arbitrary adjacent patch without an agent.
◆ empty_neighbor() [2/2]
template<class ENV , class AGENT , class PATCH >
shared_ptr<PATCH> Patch< ENV, AGENT, PATCH >::empty_neighbor |
( |
bool |
quiet = false | ) |
|
Returns an arbitrary adjacent patch without an agent.
◆ find_neighbor_agents() [1/2]
template<class ENV , class AGENT , class PATCH >
vector<shared_ptr<AGENT> > Patch< ENV, AGENT, PATCH >::find_neighbor_agents |
( |
bool |
include_self = true | ) |
|
Returns agents in one patch neighbors.
◆ find_neighbor_agents() [2/2]
template<class ENV , class AGENT , class PATCH >
vector<shared_ptr<AGENT> > Patch< ENV, AGENT, PATCH >::find_neighbor_agents |
( |
bool |
include_self = true | ) |
|
Returns agents in one patch neighbors.
◆ get_agent() [1/2]
template<class ENV , class AGENT , class PATCH >
shared_ptr<AGENT> Patch< ENV, AGENT, PATCH >::get_agent |
( |
| ) |
|
|
inline |
Assigns agent to the patch.
Definition at line 60 of file bases.h.
◆ get_agent() [2/2]
template<class ENV , class AGENT , class PATCH >
shared_ptr<AGENT> Patch< ENV, AGENT, PATCH >::get_agent |
( |
| ) |
|
|
inline |
Assigns agent to the patch.
Definition at line 60 of file bases.h.
◆ remove_agent() [1/2]
template<class ENV , class AGENT , class PATCH >
void Patch< ENV, AGENT, PATCH >::remove_agent |
( |
| ) |
|
|
inline |
Removes agent from the patch.
Definition at line 78 of file bases.h.
◆ remove_agent() [2/2]
template<class ENV , class AGENT , class PATCH >
void Patch< ENV, AGENT, PATCH >::remove_agent |
( |
| ) |
|
|
inline |
Removes agent from the patch.
Definition at line 78 of file bases.h.
◆ set_agent() [1/2]
template<class ENV , class AGENT , class PATCH >
void Patch< ENV, AGENT, PATCH >::set_agent |
( |
shared_ptr< AGENT > |
agent | ) |
|
|
inline |
To define patch behavior.
Definition at line 53 of file bases.h.
◆ set_agent() [2/2]
template<class ENV , class AGENT , class PATCH >
void Patch< ENV, AGENT, PATCH >::set_agent |
( |
shared_ptr< AGENT > |
agent | ) |
|
|
inline |
To define patch behavior.
Definition at line 53 of file bases.h.
◆ step() [1/2]
template<class ENV , class AGENT , class PATCH >
virtual void Patch< ENV, AGENT, PATCH >::step |
( |
| ) |
|
|
inlinevirtual |
◆ step() [2/2]
template<class ENV , class AGENT , class PATCH >
virtual void Patch< ENV, AGENT, PATCH >::step |
( |
| ) |
|
|
inlinevirtual |
◆ agent
template<class ENV , class AGENT , class PATCH >
std::weak_ptr< AGENT > Patch< ENV, AGENT, PATCH >::agent |
Pointer to stores agents.
Definition at line 87 of file bases.h.
◆ agent_count
template<class ENV , class AGENT , class PATCH >
unsigned Patch< ENV, AGENT, PATCH >::agent_count = 0 |
Keeps the record of residing agents count.
Definition at line 86 of file bases.h.
◆ coords
template<class ENV , class AGENT , class PATCH >
vector< double > Patch< ENV, AGENT, PATCH >::coords |
the coordinates of the patch
Definition at line 93 of file bases.h.
◆ env
template<class ENV , class AGENT , class PATCH >
std::shared_ptr< ENV > Patch< ENV, AGENT, PATCH >::env |
Pointer to the simulation environment.
Definition at line 88 of file bases.h.
◆ index
template<class ENV , class AGENT , class PATCH >
unsigned Patch< ENV, AGENT, PATCH >::index |
unique index that associate patch to mesh
Definition at line 91 of file bases.h.
◆ layer_index
template<class ENV , class AGENT , class PATCH >
unsigned Patch< ENV, AGENT, PATCH >::layer_index |
the index of the layer in which the patch is residing
Definition at line 92 of file bases.h.
◆ neighbors
template<class ENV , class AGENT , class PATCH >
vector< shared_ptr< PATCH > > Patch< ENV, AGENT, PATCH >::neighbors |
list of neighbor patches
Definition at line 95 of file bases.h.
◆ neighbors_indices
template<class ENV , class AGENT , class PATCH >
vector< unsigned > Patch< ENV, AGENT, PATCH >::neighbors_indices |
the indices of the neighbor patches
Definition at line 94 of file bases.h.
◆ on_border
template<class ENV , class AGENT , class PATCH >
bool Patch< ENV, AGENT, PATCH >::on_border = false |
whether the patch residing on the border of the domain
Definition at line 90 of file bases.h.
The documentation for this struct was generated from the following file:
- /Users/matin/Downloads/testProjs/CppyABM/include/cppyabm/bases.h