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

Complex bandpass filter. More...

Public Member Functions

 complex_bandpass_t (std::vector< mha_complex_t > A, std::vector< mha_complex_t > B)
 Constructor with filter coefficients (one 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)
 
void set_weights (std::vector< mha_complex_t > new_B)
 Allow to modify the input weights at a later stage. More...
 
std::vector< mha_complex_tget_weights () const
 
void filter (const mha_wave_t &X, mha_spec_t &Y)
 Filter method for real value input. More...
 
void filter (const mha_wave_t &X, mha_wave_t &Yre, mha_wave_t &Yim)
 Filter method for real value input. More...
 
void filter (const mha_spec_t &X, mha_spec_t &Y)
 Filter method for complex value input. More...
 
void filter (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...
 
std::string inspect () const
 

Static Public Member Functions

static std::vector< mha_complex_tcreator_A (std::vector< mha_real_t > cf, std::vector< mha_real_t > bw, mha_real_t srate, unsigned int order)
 
static std::vector< mha_complex_tcreator_B (std::vector< mha_complex_t > A, unsigned int order)
 

Private Attributes

std::vector< mha_complex_tA_
 
std::vector< mha_complex_tB_
 
std::vector< mha_complex_tYn
 

Detailed Description

Complex bandpass filter.

Constructor & Destructor Documentation

◆ complex_bandpass_t()

MHAFilter::complex_bandpass_t::complex_bandpass_t ( std::vector< mha_complex_t A,
std::vector< mha_complex_t B 
)

Constructor with filter coefficients (one per channel)

Parameters
Acomplex filter coefficients, one per band
Bcomplex weights

Member Function Documentation

◆ creator_A()

std::vector< mha_complex_t > MHAFilter::complex_bandpass_t::creator_A ( std::vector< mha_real_t cf,
std::vector< mha_real_t bw,
mha_real_t  srate,
unsigned int  order 
)
static

◆ creator_B()

std::vector< mha_complex_t > MHAFilter::complex_bandpass_t::creator_B ( std::vector< mha_complex_t A,
unsigned int  order 
)
static

◆ set_state() [1/3]

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

◆ set_state() [2/3]

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

◆ set_state() [3/3]

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

◆ set_weights()

void MHAFilter::complex_bandpass_t::set_weights ( std::vector< mha_complex_t new_B)

Allow to modify the input weights at a later stage.

◆ get_weights()

std::vector<mha_complex_t> MHAFilter::complex_bandpass_t::get_weights ( ) const
inline

◆ filter() [1/4]

void MHAFilter::complex_bandpass_t::filter ( const mha_wave_t X,
mha_spec_t Y 
)
inline

Filter method for real value input.

◆ filter() [2/4]

void MHAFilter::complex_bandpass_t::filter ( const mha_wave_t X,
mha_wave_t Yre,
mha_wave_t Yim 
)
inline

Filter method for real value input.

◆ filter() [3/4]

void MHAFilter::complex_bandpass_t::filter ( const mha_spec_t X,
mha_spec_t Y 
)
inline

Filter method for complex value input.

◆ filter() [4/4]

void MHAFilter::complex_bandpass_t::filter ( 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.

◆ inspect()

std::string MHAFilter::complex_bandpass_t::inspect ( ) const
inline

Member Data Documentation

◆ A_

std::vector<mha_complex_t> MHAFilter::complex_bandpass_t::A_
private

◆ B_

std::vector<mha_complex_t> MHAFilter::complex_bandpass_t::B_
private

◆ Yn

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

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