Class Entity¶
template <typename TSeq>
Groups of agents within a model.
#include <entity-bones.hpp>
Public Functions¶
| Type | Name |
|---|---|
| Entity (std::string name, EntityToAgentFun< TSeq > fun=nullptr) Constructs an Entity object. |
|
| void | add_agent (Agent< TSeq > & p, Model< TSeq > & model) |
| void | add_agent (Agent< TSeq > * p, Model< TSeq > & model) |
| std::vector< size_t >::iterator | begin () |
| std::vector< size_t >::const_iterator | begin () const |
| void | distribute (Model< TSeq > * model) |
| std::vector< size_t >::iterator | end () |
| std::vector< size_t >::const_iterator | end () const |
| const std::vector< size_t > & | get_agents () const |
| const std::vector< size_t > & | get_agents_ids () const |
| int | get_id () noexcept const |
| std::vector< epiworld_double > & | get_location () |
| const std::string & | get_name () noexcept const |
| void | get_queue (epiworld_fast_int * init, epiworld_fast_int * post) |
| void | get_state (epiworld_fast_int * init, epiworld_fast_int * post) |
| bool | operator!= (const Entity< TSeq > & other) const |
| bool | operator== (const Entity< TSeq > & other) const |
| size_t | operator[] (size_t i) |
| void | print () const |
| void | rm_agent (size_t idx, Model< TSeq > & model) |
| void | set_distribution (EntityToAgentFun< TSeq > fun) |
| void | set_location (std::vector< epiworld_double > loc) |
| void | set_queue (epiworld_fast_int init, epiworld_fast_int post) |
| void | set_state (epiworld_fast_int init, epiworld_fast_int post) |
| size_t | size () noexcept const |
| ~Entity () = default |
Public Functions Documentation¶
function Entity¶
Constructs an Entity object.
This constructor initializes an Entity object with the specified parameters.
Parameters:
nameThe name of the entity.funA function pointer to a function that maps the entity to an agent.
function add_agent [1/2]¶
function add_agent [2/2]¶
function begin [1/2]¶
function begin [2/2]¶
function distribute¶
function end [1/2]¶
function end [2/2]¶
function get_agents¶
function get_agents_ids¶
function get_id¶
function get_location¶
function get_name¶
function get_queue¶
function get_state¶
function operator!=¶
function operator==¶
function operator[]¶
function print¶
function rm_agent¶
function set_distribution¶
function set_location¶
function set_queue¶
function set_state¶
function size¶
function ~Entity¶
The documentation for this class was generated from the following file epiworld-src/include/epiworld/entity-bones.hpp