Monero
Loading...
Searching...
No Matches
epee::math_helper::average< val, default_base > Class Template Reference

#include <math_helper.h>

Collaboration diagram for epee::math_helper::average< val, default_base >:

Public Types

typedef val value_type

Public Member Functions

 average ()
bool set_base ()
void push (const value_type &vl)
double update (const value_type &vl)
double get_avg ()
value_type get_last_val ()

Private Attributes

unsigned int m_base
double m_last_avg_val
std::list< value_typem_list
critical_section m_lock

Member Typedef Documentation

◆ value_type

template<typename val, int default_base>
typedef val epee::math_helper::average< val, default_base >::value_type

Constructor & Destructor Documentation

◆ average()

template<typename val, int default_base>
epee::math_helper::average< val, default_base >::average ( )
inline

Member Function Documentation

◆ get_avg()

template<typename val, int default_base>
double epee::math_helper::average< val, default_base >::get_avg ( )
inline

◆ get_last_val()

template<typename val, int default_base>
value_type epee::math_helper::average< val, default_base >::get_last_val ( )
inline

◆ push()

template<typename val, int default_base>
void epee::math_helper::average< val, default_base >::push ( const value_type & vl)
inline

◆ set_base()

template<typename val, int default_base>
bool epee::math_helper::average< val, default_base >::set_base ( )
inline

◆ update()

template<typename val, int default_base>
double epee::math_helper::average< val, default_base >::update ( const value_type & vl)
inline

Member Data Documentation

◆ m_base

template<typename val, int default_base>
unsigned int epee::math_helper::average< val, default_base >::m_base
private

◆ m_last_avg_val

template<typename val, int default_base>
double epee::math_helper::average< val, default_base >::m_last_avg_val
private

◆ m_list

template<typename val, int default_base>
std::list<value_type> epee::math_helper::average< val, default_base >::m_list
private

◆ m_lock

template<typename val, int default_base>
critical_section epee::math_helper::average< val, default_base >::m_lock
private

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