DiSMEC++
anonymous_namespace{collection.cpp}::MockStat Struct Reference
Inheritance diagram for anonymous_namespace{collection.cpp}::MockStat:
dismec::stats::Statistics

Public Member Functions

std::unique_ptr< Statisticsclone () const override
 
void merge (const Statistics &other) override
 Merges this statistics of another one of the same type and settings. More...
 
nlohmann::json to_json () const override
 Converts the statistics current value into a json object. More...
 
void record_int (long integer) 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)
 
virtual void setup (const StatisticsCollection &source)
 This function has to be called before the Statistics is used to collect data for the first time. More...
 

Public Attributes

long LastValue
 

Detailed Description

Definition at line 131 of file collection.cpp.

Member Function Documentation

◆ clone()

std::unique_ptr<Statistics> anonymous_namespace{collection.cpp}::MockStat::clone ( ) const
inlineoverridevirtual

Implements dismec::stats::Statistics.

Definition at line 132 of file collection.cpp.

◆ merge()

void anonymous_namespace{collection.cpp}::MockStat::merge ( const Statistics other)
inlineoverridevirtual

Merges this statistics of another one of the same type and settings.

This operation is used to perform the reduction of the thread-local statistics into a single global statistics. For this to be possible, the merged statistics need to have not only the same type, but also the same settings (e.g. number of bins in a histogram). This is true for the thread local copies, which are clones of one another.

Parameters
otherThe statistics object to be merged into this. Must be of same type and have the same settings, e.g. a clone of this.

Implements dismec::stats::Statistics.

Definition at line 136 of file collection.cpp.

◆ record_int()

void anonymous_namespace{collection.cpp}::MockStat::record_int ( long  integer)
inlineoverridevirtual

Reimplemented from dismec::stats::Statistics.

Definition at line 146 of file collection.cpp.

◆ to_json()

nlohmann::json anonymous_namespace{collection.cpp}::MockStat::to_json ( ) const
inlineoverridevirtual

Converts the statistics current value into a json object.

Implements dismec::stats::Statistics.

Definition at line 141 of file collection.cpp.

Member Data Documentation

◆ LastValue

long anonymous_namespace{collection.cpp}::MockStat::LastValue

Definition at line 148 of file collection.cpp.


The documentation for this struct was generated from the following file: