The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
MHAFilter::iir_ord1_real_t Class Reference

First order recursive filter. More...

Public Member Functions

 iir_ord1_real_t (std::vector< mha_real_t > A, std::vector< mha_real_t > B)
 Constructor with filter coefficients (one per channel) More...
 
 iir_ord1_real_t (std::vector< mha_real_t > tau, mha_real_t srate)
 Constructor for low pass filter (one time constant per channel) More...
 
void set_state (mha_real_t val)
 
void set_state (std::vector< mha_real_t > val)
 
void set_state (mha_complex_t val)
 
mha_real_t operator() (unsigned int ch, mha_real_t x)
 Filter method for real value input, one element. More...
 
mha_complex_t operator() (unsigned int ch, mha_complex_t x)
 Filter method for complex input, one element. More...
 
void operator() (const mha_wave_t &X, mha_wave_t &Y)
 Filter method for real value input. More...
 
void operator() (const mha_spec_t &X, mha_spec_t &Y)
 Filter method for complex value input. More...
 
void operator() (const mha_wave_t &Xre, const mha_wave_t &Xim, mha_wave_t &Yre, mha_wave_t &Yim)
 Filter method for complex value input. More...
 

Private Attributes

std::vector< mha_real_tA_
 
std::vector< mha_real_tB_
 
std::vector< mha_complex_tYn
 

Detailed Description

First order recursive filter.

Constructor & Destructor Documentation

◆ iir_ord1_real_t() [1/2]

MHAFilter::iir_ord1_real_t::iir_ord1_real_t ( std::vector< mha_real_t A,
std::vector< mha_real_t B 
)

Constructor with filter coefficients (one per channel)

◆ iir_ord1_real_t() [2/2]

MHAFilter::iir_ord1_real_t::iir_ord1_real_t ( std::vector< mha_real_t tau,
mha_real_t  srate 
)

Constructor for low pass filter (one time constant per channel)

Member Function Documentation

◆ set_state() [1/3]

void MHAFilter::iir_ord1_real_t::set_state ( mha_real_t  val)

◆ set_state() [2/3]

void MHAFilter::iir_ord1_real_t::set_state ( std::vector< mha_real_t val)

◆ set_state() [3/3]

void MHAFilter::iir_ord1_real_t::set_state ( mha_complex_t  val)

◆ operator()() [1/5]

mha_real_t MHAFilter::iir_ord1_real_t::operator() ( unsigned int  ch,
mha_real_t  x 
)
inline

Filter method for real value input, one element.

◆ operator()() [2/5]

mha_complex_t MHAFilter::iir_ord1_real_t::operator() ( unsigned int  ch,
mha_complex_t  x 
)
inline

Filter method for complex input, one element.

◆ operator()() [3/5]

void MHAFilter::iir_ord1_real_t::operator() ( const mha_wave_t X,
mha_wave_t Y 
)
inline

Filter method for real value input.

◆ operator()() [4/5]

void MHAFilter::iir_ord1_real_t::operator() ( const mha_spec_t X,
mha_spec_t Y 
)
inline

Filter method for complex value input.

◆ operator()() [5/5]

void MHAFilter::iir_ord1_real_t::operator() ( const mha_wave_t Xre,
const mha_wave_t Xim,
mha_wave_t Yre,
mha_wave_t Yim 
)
inline

Filter method for complex value input.

Member Data Documentation

◆ A_

std::vector<mha_real_t> MHAFilter::iir_ord1_real_t::A_
private

◆ B_

std::vector<mha_real_t> MHAFilter::iir_ord1_real_t::B_
private

◆ Yn

std::vector<mha_complex_t> MHAFilter::iir_ord1_real_t::Yn
private

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