TestingScheme Class Reference
|
CPP API
|
mio::abm::TestingScheme Class Reference
TestingScheme to regular test Persons. More...
#include <testing_strategy.h>
Collaboration diagram for mio::abm::TestingScheme:
Public Member Functions | |
| auto | default_serialize () |
| This method is used by the default serialization feature. More... | |
| bool | is_active (TimePoint t) const |
| Gets the activity status of the scheme. More... | |
| bool | operator== (const TestingScheme &other) const |
| Compares two TestingSchemes for functional equality. More... | |
| bool | run_and_test (PersonalRandomNumberGenerator &rng, Person &person, TimePoint t) const |
| Runs the TestingScheme and potentially tests a Person. More... | |
| TestingScheme (const TestingCriteria &testing_criteria, TimeSpan validity_period, TimePoint start_date, TimePoint end_date, TestParameters test_parameters, ScalarType probability) | |
| Create a TestingScheme. More... | |
Private Member Functions | |
| mio::abm::TimePoint | get_end_date () const |
| Gets the end date of the scheme. More... | |
| mio::abm::TimePoint | get_start_date () const |
| Gets the start date of the scheme. More... | |
| TestingScheme ()=default | |
Private Attributes | |
| friend | DefaultFactory< TestingScheme > |
| TimePoint | m_end_date |
| Ending date of the scheme. More... | |
| ScalarType | m_probability |
| Probability of performing the test. More... | |
| TimePoint | m_start_date |
| Starting date of the scheme. More... | |
| TestParameters | m_test_parameters |
| Parameters of the test. More... | |
| TestingCriteria | m_testing_criteria |
| TestingCriteria of the scheme. More... | |
| TimeSpan | m_validity_period |
| The valid TimeSpan of the test. More... | |
Detailed Description
TestingScheme to regular test Persons.
Constructor & Destructor Documentation
◆ TestingScheme() [1/2]
| mio::abm::TestingScheme::TestingScheme | ( | const TestingCriteria & | testing_criteria, |
| TimeSpan | validity_period, | ||
| TimePoint | start_date, | ||
| TimePoint | end_date, | ||
| TestParameters | test_parameters, | ||
| ScalarType | probability | ||
| ) |
Create a TestingScheme.
- Parameters
-
[in] testing_criteria Vector of TestingCriteria that are checked for testing. validity_period The valid TimeSpan of the test. start_date Starting date of the scheme. end_date Ending date of the scheme. test_parameters The parameters of test to be performed. probability Probability of the test to be performed if a testing rule applies.
◆ TestingScheme() [2/2]
|
privatedefault |
Member Function Documentation
◆ default_serialize()
|
inline |
This method is used by the default serialization feature.
◆ get_end_date()
|
inlineprivate |
Gets the end date of the scheme.
- Returns
- The end date of the scheme.
◆ get_start_date()
|
inlineprivate |
Gets the start date of the scheme.
- Returns
- The start date of the scheme.
◆ is_active()
| bool mio::abm::TestingScheme::is_active | ( | TimePoint | t | ) | const |
Gets the activity status of the scheme.
- Returns
- Whether the TestingScheme is currently active.
◆ operator==()
| bool mio::abm::TestingScheme::operator== | ( | const TestingScheme & | other | ) | const |
Compares two TestingSchemes for functional equality.
◆ run_and_test()
| bool mio::abm::TestingScheme::run_and_test | ( | PersonalRandomNumberGenerator & | rng, |
| Person & | person, | ||
| TimePoint | t | ||
| ) | const |
Runs the TestingScheme and potentially tests a Person.
- Parameters
-
[in,out] rng PersonalRandomNumberGenerator of the Person being tested. [in] person Person to check. [in] t TimePoint when to run the scheme.
- Returns
- Whether the Person is assumed to have a positive test result (could be not complying to the test).
Member Data Documentation
◆ DefaultFactory< TestingScheme >
|
private |
◆ m_end_date
|
private |
Ending date of the scheme.
◆ m_probability
|
private |
Probability of performing the test.
◆ m_start_date
|
private |
Starting date of the scheme.
◆ m_test_parameters
|
private |
Parameters of the test.
◆ m_testing_criteria
|
private |
TestingCriteria of the scheme.
◆ m_validity_period
Generated by