TestingCriteria Class Reference

CPP API: mio::abm::TestingCriteria Class Reference
mio::abm::TestingCriteria Class Reference

TestingCriteria for TestingScheme. More...

#include <testing_strategy.h>

Public Member Functions

auto default_serialize ()
 
bool evaluate (const Person &p, TimePoint t) const
 Check if a Person and a Location meet all the required properties to get tested. More...
 
bool operator== (const TestingCriteria &other) const
 Compares two TestingCriteria for functional equality. More...
 
 TestingCriteria ()=default
 Create a TestingCriteria where everyone is tested. More...
 
 TestingCriteria (const std::vector< AgeGroup > &ages, const std::vector< InfectionState > &infection_states)
 Create a TestingCriteria. More...
 

Private Attributes

std::bitset< MAX_NUM_AGE_GROUPSm_ages
 Set of #AgeGroups that are either allowed or required to be tested. More...
 
std::bitset<(size_t) InfectionState::Countm_infection_states
 BitSet of InfectionStates that are either allowed or required to be tested. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ TestingCriteria() [1/2]

mio::abm::TestingCriteria::TestingCriteria ( )
default

Create a TestingCriteria where everyone is tested.

◆ TestingCriteria() [2/2]

mio::abm::TestingCriteria::TestingCriteria ( const std::vector< AgeGroup > &  ages,
const std::vector< InfectionState > &  infection_states 
)

Create a TestingCriteria.

Parameters
[in]agesVector of AgeGroups that are either allowed or required to be tested.
[in]infection_statesVector of InfectionStates that are either allowed or required to be tested. An empty vector of ages or none bitset of #InfectionStates% means that no condition on the corresponding property is set!

Member Function Documentation

◆ default_serialize()

auto mio::abm::TestingCriteria::default_serialize ( )
inline

◆ evaluate()

bool mio::abm::TestingCriteria::evaluate ( const Person p,
TimePoint  t 
) const

Check if a Person and a Location meet all the required properties to get tested.

Parameters
[in]pPerson to be checked.
[in]tTimePoint when to evaluate the TestingCriteria.

◆ operator==()

bool mio::abm::TestingCriteria::operator== ( const TestingCriteria other) const

Compares two TestingCriteria for functional equality.

Member Data Documentation

◆ m_ages

std::bitset<MAX_NUM_AGE_GROUPS> mio::abm::TestingCriteria::m_ages
private

Set of #AgeGroups that are either allowed or required to be tested.

◆ m_infection_states

std::bitset<(size_t)InfectionState::Count> mio::abm::TestingCriteria::m_infection_states
private

BitSet of InfectionStates that are either allowed or required to be tested.