Public Member Functions | Private Attributes | List of all members
utilities::number::stabilized_value< T > Class Template Reference

#include <stabilized-value.h>

Public Member Functions

void add (T val)
 
void clear ()
 
bool empty () const
 
get (float stabilization_percent=0.75f) const
 
 stabilized_value (size_t history_size)
 
 stabilized_value ()=delete
 
 stabilized_value (const stabilized_value &)=delete
 

Private Attributes

const size_t _history_size
 
float _last_stable_percentage
 
_last_stable_value
 
std::mutex _mutex
 
std::deque< T > _values
 

Detailed Description

template<typename T>
class utilities::number::stabilized_value< T >

Definition at line 30 of file stabilized-value.h.

Constructor & Destructor Documentation

template<typename T>
utilities::number::stabilized_value< T >::stabilized_value ( size_t  history_size)
inline

Definition at line 33 of file stabilized-value.h.

template<typename T>
utilities::number::stabilized_value< T >::stabilized_value ( )
delete
template<typename T>
utilities::number::stabilized_value< T >::stabilized_value ( const stabilized_value< T > &  )
delete

Member Function Documentation

template<typename T>
void utilities::number::stabilized_value< T >::add ( val)
inline

Definition at line 45 of file stabilized-value.h.

template<typename T>
void utilities::number::stabilized_value< T >::clear ( )
inline

Definition at line 107 of file stabilized-value.h.

template<typename T>
bool utilities::number::stabilized_value< T >::empty ( ) const
inline

Definition at line 113 of file stabilized-value.h.

template<typename T>
T utilities::number::stabilized_value< T >::get ( float  stabilization_percent = 0.75f) const
inline

Definition at line 63 of file stabilized-value.h.

Member Data Documentation

template<typename T>
const size_t utilities::number::stabilized_value< T >::_history_size
private

Definition at line 121 of file stabilized-value.h.

template<typename T>
float utilities::number::stabilized_value< T >::_last_stable_percentage
mutableprivate

Definition at line 123 of file stabilized-value.h.

template<typename T>
T utilities::number::stabilized_value< T >::_last_stable_value
mutableprivate

Definition at line 122 of file stabilized-value.h.

template<typename T>
std::mutex utilities::number::stabilized_value< T >::_mutex
mutableprivate

Definition at line 124 of file stabilized-value.h.

template<typename T>
std::deque< T > utilities::number::stabilized_value< T >::_values
private

Definition at line 120 of file stabilized-value.h.


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


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:43