DampingSampling< FP > Class Template Reference
|
CPP API
|
randomly sample dampings for e.g. More...
#include <damping_sampling.h>
Public Member Functions | |
| template<class V > | |
| DampingSampling (const UncertainValue< FP > &value, DampingLevel level, DampingType type, SimulationTime< FP > time, const std::vector< size_t > matrices, const Eigen::MatrixBase< V > &groups) | |
| Creates a DampingSampling. More... | |
| void | draw_sample () |
| draw a value from the distribution. More... | |
| const Eigen::VectorX< FP > & | get_group_weights () const |
| Get the group weights. More... | |
| DampingLevel | get_level () const |
| Get the damping level. More... | |
| const std::vector< size_t > & | get_matrix_indices () const |
| Get a list of matrix indices that the damping applies to. More... | |
| SimulationTime< FP > | get_time () const |
| Get the time the damping becomes active. More... | |
| DampingType | get_type () const |
| Get the damping type. More... | |
| template<class IOContext > | |
| void | serialize (IOContext &io) const |
| serialize this. More... | |
| template<class V > | |
| void | set_group_weights (const Eigen::MatrixBase< V > &v) |
| Set the group weights. More... | |
| void | set_level (DampingLevel l) |
| Set the damping level. More... | |
| void | set_matrix_indices (const std::vector< size_t > &v) |
| Set a list of matrix indices that the damping applies to. More... | |
| void | set_time (SimulationTime< FP > t) |
| Set the time the damping becomes active. More... | |
| void | set_type (DampingType t) |
| Set the damping type. More... | |
| void | set_value (const UncertainValue< FP > &v) |
| Set the random value. More... | |
| const UncertainValue< FP > & | get_value () const |
| Get the random value. More... | |
| UncertainValue< FP > & | get_value () |
| Get the random value. More... | |
| bool | operator== (const DampingSampling &other) const |
| equality comparison operators. More... | |
| bool | operator!= (const DampingSampling &other) const |
| equality comparison operators. More... | |
Static Public Member Functions | |
| template<class IOContext > | |
| static IOResult< DampingSampling > | deserialize (IOContext &io) |
| deserialize an object of this class. More... | |
Private Attributes | |
| Eigen::VectorX< FP > | m_groups |
| DampingLevel | m_level |
| std::vector< size_t > | m_matrices |
| SimulationTime< FP > | m_time |
| DampingType | m_type |
| UncertainValue< FP > | m_value |
Detailed Description
template<typename FP>
class mio::DampingSampling< FP >
randomly sample dampings for e.g.
contact matrices. All coefficients of the damping matrix depend on a single random value. The damping applies to one or more of the matrices of a DampingExpressionGroup (e.g. ContactMatrixGroup). The damping value is weighted by group (e.g. age) to be able to e.g. construct dampings that only apply to specific groups.
Constructor & Destructor Documentation
◆ DampingSampling()
|
inline |
Creates a DampingSampling.
- Parameters
-
value random value that all matrix coefficients depend on. level level of the damping. type type of the damping. time time of the damping. matrices list of matrix indices that the damping applies to. groups weights of age groups.
Member Function Documentation
◆ deserialize()
|
inlinestatic |
deserialize an object of this class.
- See also
- mio::deserialize
◆ draw_sample()
|
inline |
draw a value from the distribution.
◆ get_group_weights()
|
inline |
Get the group weights.
The groups correspond to e.g. age groups in the SECIR model.
- Returns
- weights of groups.
◆ get_level()
|
inline |
Get the damping level.
- Returns
- damping level.
◆ get_matrix_indices()
|
inline |
Get a list of matrix indices that the damping applies to.
The indices correspond to the indices of matrix in a DampingExpressionGroup (e.g. ContactMatrixGroup).
- Returns
- list of matrix indices.
◆ get_time()
|
inline |
Get the time the damping becomes active.
- Returns
- the damping time.
◆ get_type()
|
inline |
Get the damping type.
- Returns
- damping type.
◆ get_value() [1/2]
|
inline |
Get the random value.
- Returns
- the random value.
◆ get_value() [2/2]
|
inline |
Get the random value.
- Returns
- the random value.
◆ operator!=()
|
inline |
equality comparison operators.
◆ operator==()
|
inline |
equality comparison operators.
◆ serialize()
|
inline |
serialize this.
- See also
- mio::serialize
◆ set_group_weights()
|
inline |
Set the group weights.
- Parameters
-
v a vector expression of group weights.
- Template Parameters
-
V Eigen3 vector expression type.
◆ set_level()
|
inline |
Set the damping level.
- Parameters
-
l the damping level
◆ set_matrix_indices()
|
inline |
Set a list of matrix indices that the damping applies to.
- Returns
- list of matrix indices.
◆ set_time()
|
inline |
Set the time the damping becomes active.
- Parameters
-
t the damping time.
◆ set_type()
|
inline |
Set the damping type.
- Parameters
-
t the damping type.
◆ set_value()
|
inline |
Set the random value.
- Parameters
-
v random value.
Member Data Documentation
◆ m_groups
|
private |
◆ m_level
|
private |
◆ m_matrices
|
private |
◆ m_time
|
private |
◆ m_type
|
private |
◆ m_value
|
private |
Generated by