Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
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)
 
T median () const
 
int size () const
 
std::vector< Tsorted () const
 

Private Attributes

std::vector< TvValues
 
std::vector< TvSorted
 
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

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

Definition at line 30 of file timedata.h.

Member Function Documentation

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

Definition at line 37 of file timedata.h.

Here is the caller graph for this function:

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

Definition at line 49 of file timedata.h.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 62 of file timedata.h.

Here is the caller graph for this function:

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

Definition at line 67 of file timedata.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

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

Definition at line 27 of file timedata.h.

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

Definition at line 26 of file timedata.h.

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

Definition at line 25 of file timedata.h.


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