LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::linearMixer< T > Class Template Reference

Implements a mixing operator for vectors and matrices. More...

#include <ltiLinearMixer.h>

Inheritance diagram for lti::linearMixer< T >:
Inheritance graph
[legend]
Collaboration diagram for lti::linearMixer< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 linearMixer ()
 linearMixer (const linearMixer &other)
virtual ~linearMixer ()
virtual const char * getTypeName () const
linearMixer< T > & copy (const linearMixer< T > &other)
linearMixer< T > & operator= (const linearMixer< T > &other)
virtual functorclone () const
bool apply (const matrix< T > &mixer, const std::vector< const vector< T > * > &src, const std::vector< vector< T > * > &dest) const
bool apply (const matrix< T > &mixer, const std::vector< const matrix< T > * > &src, const std::vector< matrix< T > * > &dest) const

Detailed Description

template<class T>
class lti::linearMixer< T >

Implements a mixing operator for vectors and matrices.

Mixing means that you have a mixing matrix M and a list of vectors (or matrices) v[i]. Then the result of a mix is another list of vectors. Example: Let the Mixing matrix be

     [ 1 0 1 ]
 M = [ 0 1 0 ]
 

Let the source vector list be

 v = { [ 0 0 1 1 ], [ 0 1 0 1 ], [ 1 0 0 0 ] }
 

Then, the result is:

 v= { [ 0 0 1 1 ] + [ 1 0 0 0 ] , [ 0 1 0 1 ] } = { [ 1 0 1 1 ], [ 0 1 0 1 ] }
 

So, the number of rows of the mixing matrix is the number of result vectors, and the number of columns of the mixing matrix must be the number of source vectors.


Constructor & Destructor Documentation

template<class T>
lti::linearMixer< T >::linearMixer (  ) 

default constructor

template<class T>
lti::linearMixer< T >::linearMixer ( const linearMixer< T > &  other  ) 

copy constructor

Parameters:
other the object to be copied
template<class T>
virtual lti::linearMixer< T >::~linearMixer (  )  [virtual]

destructor


Member Function Documentation

template<class T>
bool lti::linearMixer< T >::apply ( const matrix< T > &  mixer,
const std::vector< const matrix< T > * > &  src,
const std::vector< matrix< T > * > &  dest 
) const

On-Copy Apply method for the mixing functor.

The functor takes the mixing matrix and the source matrices. The result is returned in the second list. This list must contain pointers to already allocated matrix objects. Its size must be equal to the number of rows of the mixing matrix. The size of the list of source matrices must be equal to the number of columns of the mixing matrix.

Parameters:
mixer the mixing matrix
src the source matrix list
dest the destination matrix list.
Returns:
true if the function could be performed, false otherwise.
template<class T>
bool lti::linearMixer< T >::apply ( const matrix< T > &  mixer,
const std::vector< const vector< T > * > &  src,
const std::vector< vector< T > * > &  dest 
) const

On-Copy Apply method for the mixing functor.

The functor takes the mixing matrix and the source vectors. The result is returned in the second list. This list must contain pointers to already allocated vector objects. Its size must be equal to the number of rows of the mixing matrix. The size of the list of source vectors must be equal to the number of columns of the mixing matrix.

Parameters:
mixer the mixing matrix
src the source vector list
dest the destination vector list.
Returns:
true if the function could be performed, false otherwise.
template<class T>
virtual functor* lti::linearMixer< T >::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

template<class T>
linearMixer<T>& lti::linearMixer< T >::copy ( const linearMixer< T > &  other  ) 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

template<class T>
virtual const char* lti::linearMixer< T >::getTypeName (  )  const [virtual]

returns the name of this type ("linearMixer")

Reimplemented from lti::functor.

template<class T>
linearMixer<T>& lti::linearMixer< T >::operator= ( const linearMixer< T > &  other  ) 

alias for copy member

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.


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

Generated on Sat Apr 10 15:28:28 2010 for LTI-Lib by Doxygen 1.6.1