#include <filter.h>
ema = exponential moving average filter, corresponds to a LOP f1 = lowpass cutoff frequency f2 = highpass cutoff frequency 0 < f2 < f1 < 1 f1=1 -> no LOP filtering, f2=0 -> no highpass filtering f1=1 and f2=0 -> no filtering f2=0 -> only lowpass filtering
Finally the output get rescaled with output = output * (1 + f2/f1) (to keep the spectral radius in ESNs)
Public Member Functions | |
BPFilter () | |
virtual | ~BPFilter () |
const BPFilter & | operator= (const BPFilter< T > &src) |
class BPFilter Implementation | |
void | setBPCutoff (const typename DEVector< T >::Type &f1, const typename DEVector< T >::Type &f2) throw (AUExcept) |
void | calc (typename DEVector< T >::Type &x) |
Protected Attributes | |
DEVector< T >::Type | ema1_ |
DEVector< T >::Type | ema2_ |
DEVector< T >::Type | f1_ |
DEVector< T >::Type | f2_ |
DEVector< T >::Type | scale_ |
aureservoir::BPFilter< T >::BPFilter | ( | ) | [inline] |
Constructor.
virtual aureservoir::BPFilter< T >::~BPFilter | ( | ) | [inline, virtual] |
Destructor.
const BPFilter& aureservoir::BPFilter< T >::operator= | ( | const BPFilter< T > & | src | ) | [inline] |
assignment operator
void aureservoir::BPFilter< T >::setBPCutoff | ( | const typename DEVector< T >::Type & | f1, | |
const typename DEVector< T >::Type & | f2 | |||
) | throw (AUExcept) [inline] |
set LOP and HIP cutoff frequencies
void aureservoir::BPFilter< T >::calc | ( | typename DEVector< T >::Type & | x | ) | [inline] |
calculates one filter step on each element of x and writes the result back to x
DEVector<T>::Type aureservoir::BPFilter< T >::ema1_ [protected] |
last output of ema1 (exponential moving average filter 1)
DEVector<T>::Type aureservoir::BPFilter< T >::ema2_ [protected] |
last output of ema2 (exponential moving average filter 2)
DEVector<T>::Type aureservoir::BPFilter< T >::f1_ [protected] |
low pass cutoff frequencies
DEVector<T>::Type aureservoir::BPFilter< T >::f2_ [protected] |
high pass cutoff frequencies
DEVector<T>::Type aureservoir::BPFilter< T >::scale_ [protected] |
scale factor for output, to not shrink spectral radius