Bands Class Reference

Algorithm to calculate the sum of values in a given set of weighted bands. More...

#include <Bands.h>

List of all members.

Public Member Functions

 Bands ()
 Bands (MatrixXI starts, std::vector< MatrixXR > weights)
 ~Bands ()
void process (const MatrixXR &frames, MatrixXR *bands)
std::vector< MatrixXR > weights () const
void bandWeights (int band, MatrixXR *bandWeights) const
void starts (MatrixXI *result) const
int bands () const
void setStartsWeights (const MatrixXI &starts, std::vector< MatrixXR > weights, bool callSetup=true)


Detailed Description

Algorithm to calculate the sum of values in a given set of weighted bands.

This class represents an object to perform calculatinos of band values. The value of a band corresponds to the sum of the values of the input array in the band's positions multiplied with the band's weights.

In this implementation the positions of a given band are defined by the index of the first array cell of the band and the size of the weights array. The full configuration of the bands algorithm is defined using a single column matrix for the starts of the bands and a vector of single row matrices for the weights each band.

Note that the number of rows of the starts matrix and the size of the vector of weights must be the same, and this will be the number of bands.

Author:
Ricard Marxer
See also:
MelBands

Constructor & Destructor Documentation

Bands (  ) 

Constructs a Bands object with a single band covering the entire array.

Bands ( MatrixXI  starts,
std::vector< MatrixXR >  weights 
)

Constructs a Bands object with the specified starts and weights setting.

Parameters:
starts single column matrix of Integers that determine the first array cell of each band.
weights vector of single row matrices of Reals that determine the values of the weights of each band.

~Bands (  ) 

Destroys the Bands algorithm and frees its resources.


Member Function Documentation

void process ( const MatrixXR &  frames,
MatrixXR *  bands 
)

Calculates the bands of frames using the specified starts and weights properties.

Parameters:
frames matrix of Real values.
bands pointer to a matrix of Real values for the output. The matrix should have the same number of rows as frames and as many columns as the number of bands (rows in the starts matrix and elements in the weights vector).
Note that if the output matrix is not of the required size it will be resized, reallocating a new memory space if necessary.

Referenced by SpectralNoiseSuppression::process(), and MelBands::process().

vector< MatrixXR > weights (  )  const

Return the vector of weights.

See also:
starts, bandWeights, setStartsWeights

Referenced by MelBands::weights().

void bandWeights ( int  band,
MatrixXR *  bandWeights 
) const

Return in bandWeights the weights of the band given by the index band.

See also:
weights

Referenced by MelBands::bandWeights().

void starts ( MatrixXI *  result  )  const

Return in result the single column matrix of start indices of the bands.

Referenced by MelBands::starts().

int bands (  )  const

Return number of bands.

Referenced by MelBands::bands().

void setStartsWeights ( const MatrixXI &  starts,
std::vector< MatrixXR >  weights,
bool  callSetup = true 
)

Determines the starts positions and weights of the bands. Note that the number of rows of starts and the size of weights should be the same and will determine the number of bands.


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

Generated on Tue Mar 31 20:38:33 2009 for Loudia by  doxygen 1.5.6