Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

CMedianFilter< T > Class Template Reference

Median filter over a stream of values. More...

#include <timedata.h>

Public Member Functions

 CMedianFilter (unsigned int _size, T initial_value)
 
void input (T value)
 
median () const
 
int size () const
 
std::vector< T > sorted () const
 

Private Attributes

std::vector< T > vValues
 
std::vector< T > vSorted
 
unsigned int nSize
 

Detailed Description

template<typename T>
class CMedianFilter< T >

Median filter over a stream of values.

Returns the median of the last N numbers

Definition at line 22 of file timedata.h.

Constructor & Destructor Documentation

◆ CMedianFilter()

template<typename T>
CMedianFilter< T >::CMedianFilter ( unsigned int  _size,
initial_value 
)
inline

Definition at line 30 of file timedata.h.

References CMedianFilter< T >::vSorted, and CMedianFilter< T >::vValues.

Member Function Documentation

◆ input()

template<typename T>
void CMedianFilter< T >::input ( value)
inline

◆ median()

template<typename T>
T CMedianFilter< T >::median ( ) const
inline

Definition at line 49 of file timedata.h.

References CMedianFilter< T >::vSorted.

Referenced by AddTimeData().

◆ size()

template<typename T>
int CMedianFilter< T >::size ( ) const
inline

Definition at line 62 of file timedata.h.

References CMedianFilter< T >::vValues.

Referenced by AddTimeData().

◆ sorted()

template<typename T>
std::vector<T> CMedianFilter< T >::sorted ( ) const
inline

Definition at line 67 of file timedata.h.

References CMedianFilter< T >::vSorted.

Referenced by AddTimeData().

Member Data Documentation

◆ nSize

template<typename T>
unsigned int CMedianFilter< T >::nSize
private

Definition at line 27 of file timedata.h.

Referenced by CMedianFilter< T >::input().

◆ vSorted

template<typename T>
std::vector<T> CMedianFilter< T >::vSorted
private

◆ vValues

template<typename T>
std::vector<T> CMedianFilter< T >::vValues
private

The documentation for this class was generated from the following file:
Released under the MIT license