DiSMEC++
dismec::stats::VectorReductionStat Class Referencefinal

#include <statistics.h>

Inheritance diagram for dismec::stats::VectorReductionStat:
dismec::stats::StatImplBase< VectorReductionStat > dismec::stats::Statistics

Public Member Functions

 VectorReductionStat (std::unique_ptr< Statistics > stat, std::string reduction)
 
 ~VectorReductionStat () override=default
 
void record_vec (const DenseRealVector &value) override
 
std::unique_ptr< Statisticsclone () const override
 
void merge_imp (const VectorReductionStat &other)
 
nlohmann::json to_json () const override
 Converts the statistics current value into a json object. More...
 
void record (int integer)
 
void record (long integer)
 
void record (real_t real)
 
void record (const DenseRealVector &vector)
 
- Public Member Functions inherited from dismec::stats::StatImplBase< VectorReductionStat >
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)
 
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...
 

Private Attributes

std::unique_ptr< Statisticsm_Target
 
std::function< real_t(const DenseRealVector &)> m_Reduction
 
std::string m_ReductionName
 

Detailed Description

Definition at line 102 of file statistics.h.

Constructor & Destructor Documentation

◆ VectorReductionStat()

VectorReductionStat::VectorReductionStat ( std::unique_ptr< Statistics stat,
std::string  reduction 
)

Definition at line 186 of file statistics.cpp.

References m_Reduction, and m_ReductionName.

◆ ~VectorReductionStat()

dismec::stats::VectorReductionStat::~VectorReductionStat ( )
overridedefault

Member Function Documentation

◆ clone()

std::unique_ptr< Statistics > VectorReductionStat::clone ( ) const
overridevirtual

Implements dismec::stats::Statistics.

Definition at line 205 of file statistics.cpp.

References m_ReductionName, and m_Target.

◆ merge_imp()

void VectorReductionStat::merge_imp ( const VectorReductionStat other)

Definition at line 209 of file statistics.cpp.

References m_Target.

◆ record() [1/4]

void dismec::stats::Statistics::record
inline

Definition at line 74 of file stats_base.h.

◆ record() [2/4]

void dismec::stats::Statistics::record
inline

Definition at line 70 of file stats_base.h.

◆ record() [3/4]

void dismec::stats::Statistics::record
inline

Definition at line 72 of file stats_base.h.

◆ record() [4/4]

void dismec::stats::Statistics::record
inline

Definition at line 73 of file stats_base.h.

◆ record_vec()

void VectorReductionStat::record_vec ( const DenseRealVector value)
overridevirtual

Reimplemented from dismec::stats::Statistics.

Definition at line 201 of file statistics.cpp.

References m_Reduction, and m_Target.

◆ to_json()

nlohmann::json VectorReductionStat::to_json ( ) const
overridevirtual

Converts the statistics current value into a json object.

Implements dismec::stats::Statistics.

Definition at line 213 of file statistics.cpp.

References m_Target.

Member Data Documentation

◆ m_Reduction

std::function<real_t(const DenseRealVector&)> dismec::stats::VectorReductionStat::m_Reduction
private

Definition at line 116 of file statistics.h.

Referenced by record_vec(), and VectorReductionStat().

◆ m_ReductionName

std::string dismec::stats::VectorReductionStat::m_ReductionName
private

Definition at line 117 of file statistics.h.

Referenced by clone(), and VectorReductionStat().

◆ m_Target

std::unique_ptr<Statistics> dismec::stats::VectorReductionStat::m_Target
private

Definition at line 115 of file statistics.h.

Referenced by clone(), merge_imp(), record_vec(), and to_json().


The documentation for this class was generated from the following files: