ContactMatrix< FP > Class Template Reference
|
CPP API
|
represents time dependent contact frequencies between groups. More...
#include <contact_matrix.h>
Public Types | |
| using | Base = DampingMatrixExpression< FP, SquareDampings< FP > > |
Public Types inherited from mio::DampingMatrixExpression< FP, SquareDampings< FP > > | |
| using | DampingsType = SquareDampings< FP > |
| using | Matrix = typename Shape::Matrix |
| using | Shape = typename DampingsType::Shape |
Public Member Functions | |
| Eigen::Index | get_num_groups () const |
| get the number of groups. More... | |
Public Member Functions inherited from mio::DampingMatrixExpression< FP, SquareDampings< FP > > | |
| void | add_damping (T &&... t) |
| adds a damping. More... | |
| void | clear_dampings () |
| remove all dampings. More... | |
| DampingMatrixExpression (const Eigen::MatrixBase< M > &baseline) | |
| construct with only baseline, minimum and dampings is zero. More... | |
| DampingMatrixExpression (const Eigen::MatrixBase< M > &baseline, const Eigen::MatrixBase< K > &minimum) | |
| construct with baseline and minimum contacts and zero dampings. More... | |
| requires std::is_constructible_v< Shape, T... > | DampingMatrixExpression (T... shape_args) |
| construct with shape. More... | |
| Matrix & | get_baseline () |
| const Matrix & | get_baseline () const |
| get the baseline matrix. More... | |
| auto | get_dampings () |
| auto | get_dampings () const |
| list of dampings. More... | |
| auto | get_matrix_at (SimulationTime< FP > t) const |
| Applies dampings to compute the real contact frequency at a point in time. More... | |
| Matrix & | get_minimum () |
| const Matrix & | get_minimum () const |
| get the minimum matrix. More... | |
| Shape | get_shape () const |
| dimensions of the matrix. More... | |
| bool | operator!= (const DampingMatrixExpression &other) const |
| bool | operator== (const DampingMatrixExpression &other) const |
| equality operators. More... | |
| void | remove_damping (size_t i) |
| remove a damping. More... | |
| void | serialize (IOContext &io) const |
| serialize this. More... | |
| void | set_automatic_cache_update (bool b) |
| Enable/disable automatic cache update of the dampings. More... | |
Static Public Member Functions | |
| template<class IOContext > | |
| static IOResult< ContactMatrix > | deserialize (IOContext &io) |
| deserialize an object of this class. More... | |
Static Public Member Functions inherited from mio::DampingMatrixExpression< FP, SquareDampings< FP > > | |
| static IOResult< DampingMatrixExpression > | deserialize (IOContext &io) |
| deserialize an object of this class. More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from mio::DampingMatrixExpression< FP, SquareDampings< FP > > | |
| static IOResult< Derived > | deserialize (IOContext &io, Tag< Derived >) |
| deserialize an object of a class derived from this. More... | |
Detailed Description
template<typename FP>
class mio::ContactMatrix< FP >
represents time dependent contact frequencies between groups.
consists of constant baseline and irreducible minimum contacts. actual contacts are adjusted over time by dampings. The effective contacts are B - D * (B - M), where B is the baseline, D are combined dampings and M is the minimum. The minimum is not necessarily smaller than the baseline in every entry, but it reflects the state at maximum lockdown. In places where the minimum is greater than the baseline, a positive damping increases instead of reduces contacts. All these members are matrix valued, e.g. B_ij are the normal contacts that one person in group i has with persons in group j.
Member Typedef Documentation
◆ Base
| using mio::ContactMatrix< FP >::Base = DampingMatrixExpression<FP, SquareDampings<FP> > |
Member Function Documentation
◆ deserialize()
|
inlinestatic |
deserialize an object of this class.
- See also
- mio::deserialize
◆ get_num_groups()
|
inline |
get the number of groups.
Generated by
Public Types inherited from