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

Copy all or a subset of all numeric AC variables into an array of matrixes. More...

Public Member Functions

 acspace2matrix_t (algo_comm_t &ac, const std::vector< std::string > &names)
 Constructor. More...
 
 acspace2matrix_t (const MHA_AC::acspace2matrix_t &src)
 Constructor with initialization from an instance. More...
 
 ~acspace2matrix_t ()
 
MHA_AC::acspace2matrix_toperator= (const MHA_AC::acspace2matrix_t &src)
 Copy all contents (deep copy). More...
 
MHA_AC::ac2matrix_toperator[] (unsigned int k)
 Access operator. More...
 
const MHA_AC::ac2matrix_toperator[] (unsigned int k) const
 Constant access operator. More...
 
void update ()
 Update function. More...
 
unsigned int size () const
 Number of matrixes in AC space. More...
 
unsigned int frame () const
 Actual frame number. More...
 
void insert (algo_comm_t &ac)
 Insert AC space copy into an AC space (other than source AC space) More...
 

Private Attributes

unsigned int len
 
MHA_AC::ac2matrix_t ** data
 
unsigned int frameno
 

Detailed Description

Copy all or a subset of all numeric AC variables into an array of matrixes.

Constructor & Destructor Documentation

◆ acspace2matrix_t() [1/2]

MHA_AC::acspace2matrix_t::acspace2matrix_t ( algo_comm_t ac,
const std::vector< std::string > &  names 
)

Constructor.

Scan all given AC variables and allocate corresponding matrixes.

Parameters
acAC handle.
namesNames of AC variables, or empty for all.

◆ acspace2matrix_t() [2/2]

MHA_AC::acspace2matrix_t::acspace2matrix_t ( const MHA_AC::acspace2matrix_t src)

Constructor with initialization from an instance.

Parameters
srcInstance to be copied.

◆ ~acspace2matrix_t()

MHA_AC::acspace2matrix_t::~acspace2matrix_t ( )

Member Function Documentation

◆ operator=()

MHA_AC::acspace2matrix_t & MHA_AC::acspace2matrix_t::operator= ( const MHA_AC::acspace2matrix_t src)

Copy all contents (deep copy).

Parameters
srcArray of matrixes to be copied.

◆ operator[]() [1/2]

MHA_AC::ac2matrix_t& MHA_AC::acspace2matrix_t::operator[] ( unsigned int  k)
inline

Access operator.

Parameters
kindex into array; should not exceed size()-1.
Return values
Referenceto matrix.

◆ operator[]() [2/2]

const MHA_AC::ac2matrix_t& MHA_AC::acspace2matrix_t::operator[] ( unsigned int  k) const
inline

Constant access operator.

Parameters
kindex into array; should not exceed size()-1.
Return values
Constantreference to matrix.

◆ update()

void MHA_AC::acspace2matrix_t::update ( )
inline

Update function.

This function updates all matrixes from their corresponding AC variables. It can be called from the MHA Framework prepare function or in the processing callback.

◆ size()

unsigned int MHA_AC::acspace2matrix_t::size ( ) const
inline

Number of matrixes in AC space.

◆ frame()

unsigned int MHA_AC::acspace2matrix_t::frame ( ) const
inline

Actual frame number.

◆ insert()

void MHA_AC::acspace2matrix_t::insert ( algo_comm_t ac)

Insert AC space copy into an AC space (other than source AC space)

Parameters
acAC space handle to insert data

Member Data Documentation

◆ len

unsigned int MHA_AC::acspace2matrix_t::len
private

◆ data

MHA_AC::ac2matrix_t** MHA_AC::acspace2matrix_t::data
private

◆ frameno

unsigned int MHA_AC::acspace2matrix_t::frameno
private

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