OpenMS
RangeStats< VALUE_TYPE > Struct Template Reference

Struct representing the statistics about a set of values. More...

#include <OpenMS/VISUAL/VISITORS/LayerStatistics.h>

Collaboration diagram for RangeStats< VALUE_TYPE >:
[legend]

Public Member Functions

void addDataPoint (VALUE_TYPE v)
 
VALUE_TYPE getMin () const
 
VALUE_TYPE getMax () const
 
size_t getCount () const
 
double getAvg () const
 get the average value from all calls to addDataPoint() More...
 

Protected Attributes

size_t count_ {0}
 
VALUE_TYPE min_ {std::numeric_limits<VALUE_TYPE>::max()}
 
VALUE_TYPE max_ {std::numeric_limits<VALUE_TYPE>::lowest()}
 
VALUE_TYPE sum_ {0}
 

Detailed Description

template<typename VALUE_TYPE>
struct OpenMS::RangeStats< VALUE_TYPE >

Struct representing the statistics about a set of values.

Min and max are only useful if count > 0

Member Function Documentation

◆ addDataPoint()

◆ getAvg()

double getAvg ( ) const
inline

get the average value from all calls to addDataPoint()

References RangeStats< VALUE_TYPE >::count_, and RangeStats< VALUE_TYPE >::sum_.

◆ getCount()

size_t getCount ( ) const
inline

◆ getMax()

VALUE_TYPE getMax ( ) const
inline

◆ getMin()

VALUE_TYPE getMin ( ) const
inline

Member Data Documentation

◆ count_

◆ max_

VALUE_TYPE max_ {std::numeric_limits<VALUE_TYPE>::lowest()}
protected

◆ min_

VALUE_TYPE min_ {std::numeric_limits<VALUE_TYPE>::max()}
protected

◆ sum_

VALUE_TYPE sum_ {0}
protected