DiSMEC++
dismec::stats Namespace Reference

Namespaces

 detail
 

Classes

class  StatisticsCollection
 This class manages a collection of named Statistics objects. More...
 
struct  StatisticMetaData
 Data that is associated with each declared statistics. More...
 
class  CounterStat
 
class  BasicStat
 
class  TaggedStat
 
class  MultiStat
 
class  FullRecordStat
 
class  VectorReductionStat
 
class  TagContainer
 A tag container combines a name with a shared pointer, which points to the tag value. More...
 
class  Statistics
 TODO maybe we should solve this with a variant which does the dispatch of expected type and tag. More...
 
class  StatImplBase
 Helper class for implementing Statistics classes. More...
 
class  ScopeTimer
 
class  Tracked
 A base class to be used for all types that implement some for of statistics tracking. More...
 

Typedefs

using stat_id_t = opaque_int_type< detail::stat_id_tag >
 An opaque int-like type that is used to identify a statistic in a StatisticsCollection. More...
 
using tag_id_t = opaque_int_type< detail::tag_id_tag >
 An opaque int-like type that is used to identify a tag in a StatisticsCollection. More...
 

Functions

std::unique_ptr< Statisticsmake_linear_histogram (int bins, real_t min, real_t max)
 
std::unique_ptr< Statisticsmake_logarithmic_histogram (int bins, real_t min, real_t max)
 
std::unique_ptr< Statisticsmake_linear_histogram (std::string tag, int max_tag, int bins, real_t min, real_t max)
 
std::unique_ptr< Statisticsmake_logarithmic_histogram (std::string tag, int max_tag, int bins, real_t min, real_t max)
 
std::unique_ptr< stats::Statisticsmake_stat_from_json (const nlohmann::json &source)
 Generates a stats::Statistics object based on a json configuration. More...
 
ScopeTimer record_scope_time (StatisticsCollection &accumulator, stat_id_t id)
 

Typedef Documentation

◆ stat_id_t

using dismec::stats::stat_id_t = typedef opaque_int_type<detail::stat_id_tag>

An opaque int-like type that is used to identify a statistic in a StatisticsCollection.

Definition at line 24 of file stat_id.h.

◆ tag_id_t

using dismec::stats::tag_id_t = typedef opaque_int_type<detail::tag_id_tag>

An opaque int-like type that is used to identify a tag in a StatisticsCollection.

Definition at line 28 of file stat_id.h.

Function Documentation

◆ make_linear_histogram() [1/2]

std::unique_ptr< Statistics > dismec::stats::make_linear_histogram ( int  bins,
real_t  min,
real_t  max 
)

Definition at line 218 of file histogram.cpp.

Referenced by make_stat_from_json().

◆ make_linear_histogram() [2/2]

std::unique_ptr< Statistics > dismec::stats::make_linear_histogram ( std::string  tag,
int  max_tag,
int  bins,
real_t  min,
real_t  max 
)

Definition at line 225 of file histogram.cpp.

◆ make_logarithmic_histogram() [1/2]

std::unique_ptr< Statistics > dismec::stats::make_logarithmic_histogram ( int  bins,
real_t  min,
real_t  max 
)

Definition at line 222 of file histogram.cpp.

Referenced by make_stat_from_json().

◆ make_logarithmic_histogram() [2/2]

std::unique_ptr< Statistics > dismec::stats::make_logarithmic_histogram ( std::string  tag,
int  max_tag,
int  bins,
real_t  min,
real_t  max 
)

Definition at line 229 of file histogram.cpp.

◆ make_stat_from_json()

std::unique_ptr< Statistics > dismec::stats::make_stat_from_json ( const nlohmann::json source)

Generates a stats::Statistics object based on a json configuration.

Parameters
sourceA json object the describes the statistics.
Todo:
document the json format.

Definition at line 218 of file statistics.cpp.

References make_linear_histogram(), and make_logarithmic_histogram().

Referenced by dismec::TrainingStatsGatherer::add_accu().

◆ record_scope_time()

ScopeTimer dismec::stats::record_scope_time ( StatisticsCollection accumulator,
stat_id_t  id 
)
inline

Definition at line 53 of file timer.h.

Referenced by dismec::stats::Tracked::make_timer().