33 : m_index_immune(0), m_pool_id(poolId), m_pool_type(type), m_members()
45 unsigned int infected = 0;
48 if (person->GetHealth().IsInfected()) {
57 bool infectious_cases =
false;
58 unsigned int num_cases = 0;
62 if (
m_members[i_member]->GetHealth().IsImmune()) {
64 unsigned int new_place = m_index_immune - 1;
66 while (!swapped && new_place > i_member) {
67 if (
m_members[new_place]->GetHealth().IsImmune()) {
77 else if (!
m_members[i_member]->GetHealth().IsSusceptible()) {
78 if (!infectious_cases &&
m_members[i_member]->GetHealth().IsInfectious()) {
79 infectious_cases =
true;
81 if (i_member > num_cases) {
87 return std::make_tuple(infectious_cases, num_cases);
std::vector< Person * > m_members
Pointers to contactpool members (raw pointers intentional).
Id
Enumerates the ContactPool types.
Header file for the Person class.
Header for the core ContactPool class.
void AddMember(Person *p)
Add the given Person.
unsigned int GetInfectedCount() const
Get Infected count.
unsigned int m_index_immune
Index of the first immune member in the ContactPool.
std::tuple< bool, unsigned int > SortMembers()
Sort w.r.t. health status: order: exposed/infected/recovered, susceptible, immune.
ContactPool(unsigned int poolId, ContactType::Id type)
Initializing constructor.
Store and handle person data.
Namespace for the simulator and related classes.