Bitcoin ABC 0.30.5
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)
 
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 24 of file timedata.h.

Constructor & Destructor Documentation

◆ CMedianFilter()

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

Definition at line 31 of file timedata.h.

Member Function Documentation

◆ input()

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

Definition at line 37 of file timedata.h.

◆ median()

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

Definition at line 48 of file timedata.h.

Here is the call graph for this function:

◆ size()

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

Definition at line 62 of file timedata.h.

◆ sorted()

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

Definition at line 64 of file timedata.h.

Member Data Documentation

◆ nSize

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

Definition at line 28 of file timedata.h.

◆ vSorted

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

Definition at line 27 of file timedata.h.

◆ vValues

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

Definition at line 26 of file timedata.h.


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