#include <Filter.h>

Classes

struct  Parameters
 

Public Member Functions

 Filter (Parameters params)
 Construct an IIR filter with numerators b and denominators a. More...
 
 ~Filter ()
 
void reset ()
 
void process (const double *const QM_R__ in, double *const QM_R__ out, const int n)
 Filter the input sequence. More...
 
int getOrder () const
 

Private Member Functions

 Filter (const Filter &)
 
Filteroperator= (const Filter &)
 

Private Attributes

int m_order
 
int m_sz
 
std::vector< double > m_a
 
std::vector< double > m_b
 
std::vector< double > m_bufa
 
std::vector< double > m_bufb
 
int m_offa
 
int m_offb
 
int m_offmax
 
bool m_fir
 

Detailed Description

Definition at line 22 of file Filter.h.

Constructor & Destructor Documentation

Filter::Filter ( Parameters  params)

Construct an IIR filter with numerators b and denominators a.

The filter will have order b.size()-1. To make an FIR filter, leave the vector a in the param struct empty. Otherwise, a and b must have the same number of values.

Definition at line 21 of file Filter.cpp.

References Filter::Parameters::a, and Filter::Parameters::b.

Filter::~Filter ( )

Definition at line 59 of file Filter.cpp.

Filter::Filter ( const Filter )
private

Member Function Documentation

void Filter::reset ( )

Definition at line 64 of file Filter.cpp.

Referenced by FiltFilt::process().

void Filter::process ( const double *const QM_R__  in,
double *const QM_R__  out,
const int  n 
)

Filter the input sequence.

  • in of length
  • n samples, and write the resulting
  • n samples into
  • out. There must be enough room in
  • out for
  • n samples to be written.

Definition at line 77 of file Filter.cpp.

Referenced by FiltFilt::process().

int Filter::getOrder ( ) const
inline

Definition at line 51 of file Filter.h.

References m_order.

Referenced by FiltFilt::FiltFilt().

Filter& Filter::operator= ( const Filter )
private

Member Data Documentation

int Filter::m_order
private

Definition at line 54 of file Filter.h.

Referenced by getOrder().

int Filter::m_sz
private

Definition at line 55 of file Filter.h.

std::vector<double> Filter::m_a
private

Definition at line 56 of file Filter.h.

std::vector<double> Filter::m_b
private

Definition at line 57 of file Filter.h.

std::vector<double> Filter::m_bufa
private

Definition at line 58 of file Filter.h.

std::vector<double> Filter::m_bufb
private

Definition at line 59 of file Filter.h.

int Filter::m_offa
private

Definition at line 60 of file Filter.h.

int Filter::m_offb
private

Definition at line 61 of file Filter.h.

int Filter::m_offmax
private

Definition at line 62 of file Filter.h.

bool Filter::m_fir
private

Definition at line 63 of file Filter.h.


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