DiSMEC++
|
#include <statistics.h>
Public Member Functions | |
MultiStat (std::unordered_map< std::string, std::unique_ptr< Statistics >> ss) | |
~MultiStat () override=default | |
void | record_int (long value) override |
void | record_real (real_t value) override |
void | record_vec (const DenseRealVector &vector) override |
std::unique_ptr< Statistics > | clone () const override |
void | merge_imp (const MultiStat &other) |
nlohmann::json | to_json () const override |
Converts the statistics current value into a json object. More... | |
void | setup (const StatisticsCollection &source) override |
This function has to be called before the Statistics is used to collect data for the first time. More... | |
Public Member Functions inherited from dismec::stats::StatImplBase< MultiStat > | |
void | merge (const Statistics &other) override |
Merges this statistics of another one of the same type and settings. More... | |
void | record_vec (const DenseRealVector &vector) override |
Public Member Functions inherited from dismec::stats::Statistics | |
virtual | ~Statistics ()=default |
void | record (int integer) |
void | record (long integer) |
void | record (real_t real) |
void | record (const DenseRealVector &vector) |
Private Types | |
using | stats_map_t = std::unordered_map< std::string, std::unique_ptr< Statistics > > |
Private Member Functions | |
template<class T > | |
void | do_record (T &&) |
Private Attributes | |
stats_map_t | m_SubStats |
Definition at line 66 of file statistics.h.
|
private |
Definition at line 80 of file statistics.h.
MultiStat::MultiStat | ( | std::unordered_map< std::string, std::unique_ptr< Statistics >> | ss | ) |
Definition at line 114 of file statistics.cpp.
|
overridedefault |
|
overridevirtual |
Implements dismec::stats::Statistics.
Definition at line 135 of file statistics.cpp.
References m_SubStats.
|
private |
Definition at line 129 of file statistics.cpp.
References m_SubStats.
Referenced by record_int(), record_real(), and record_vec().
void MultiStat::merge_imp | ( | const MultiStat & | other | ) |
Definition at line 143 of file statistics.cpp.
References m_SubStats.
|
overridevirtual |
Reimplemented from dismec::stats::Statistics.
Definition at line 118 of file statistics.cpp.
References do_record().
|
overridevirtual |
Reimplemented from dismec::stats::Statistics.
Definition at line 121 of file statistics.cpp.
References do_record().
|
overridevirtual |
Reimplemented from dismec::stats::Statistics.
Definition at line 124 of file statistics.cpp.
References do_record().
|
overridevirtual |
This function has to be called before the Statistics
is used to collect data for the first time.
This will look up any tags that might be used within the statistics in source
.
std::runtime_error | if a tag is required by the statistics but cannot be found in source . |
source | The statistics collection from which the tags can be read. |
Reimplemented from dismec::stats::Statistics.
Definition at line 160 of file statistics.cpp.
References m_SubStats.
|
overridevirtual |
Converts the statistics current value into a json object.
Implements dismec::stats::Statistics.
Definition at line 149 of file statistics.cpp.
References m_SubStats.
|
private |
Definition at line 81 of file statistics.h.
Referenced by clone(), do_record(), merge_imp(), setup(), and to_json().