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

lti::expandVector Class Reference

This class is used to map a function f(x) represented by a vector into another scale f(g(x)), where g(x) can be given. More...

#include <ltiExpandVector.h>

Inheritance diagram for lti::expandVector:
Inheritance graph
[legend]
Collaboration diagram for lti::expandVector:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 the parameters for the class expandVector More...

Public Member Functions

 expandVector ()
 expandVector (double(*function)(double))
 expandVector (const expandVector &other)
virtual ~expandVector ()
virtual const char * getTypeName () const
vector< float > & apply (vector< float > &srcdest) const
vector< double > & apply (vector< double > &srcdest) const
vector< float > & apply (const vector< float > &src, vector< float > &dest) const
vector< double > & apply (const vector< double > &src, vector< double > &dest) const
vector< double > & draw (const vector< double > &in, vector< double > &out, double(*g)(double)=intPow2m) const
vector< float > & draw (const vector< float > &in, vector< float > &out, double(*g)(double)=intPow2m) const
expandVectorcopy (const expandVector &other)
virtual functorclone () const
const parametersgetParameters () const

Static Public Member Functions

static double intPow2m (double x)

Detailed Description

This class is used to map a function f(x) represented by a vector into another scale f(g(x)), where g(x) can be given.

g(x) must be monotonically increasing. Linear interpolation will be used between the "samples".


Constructor & Destructor Documentation

lti::expandVector::expandVector (  ) 

default constructor.

Initialize with default parameters

lti::expandVector::expandVector ( double(*)(double)  function  ) 

constructor, with the wished default mapping function

lti::expandVector::expandVector ( const expandVector other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::expandVector::~expandVector (  )  [virtual]

destructor


Member Function Documentation

vector<double>& lti::expandVector::apply ( const vector< double > &  src,
vector< double > &  dest 
) const

operates on a copy of the given parameters.

Parameters:
src vector<double> with the source data.
dest vector<double> where the result will be left.
Returns:
a reference to the dest.
vector<float>& lti::expandVector::apply ( const vector< float > &  src,
vector< float > &  dest 
) const

operates on a copy of the given parameters.

Parameters:
src vector<float> with the source data.
dest vector<float> where the result will be left.
Returns:
a reference to the dest.
vector<double>& lti::expandVector::apply ( vector< double > &  srcdest  )  const

operates on the given parameter.

Parameters:
srcdest vector<double> with the source data. The result will be left here too.
Returns:
a reference to the srcdest.
vector<float>& lti::expandVector::apply ( vector< float > &  srcdest  )  const

operates on the given parameter.

Parameters:
srcdest vector<float> with the source data. The result will be left here too.
Returns:
a reference to the srcdest.
virtual functor* lti::expandVector::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

expandVector& lti::expandVector::copy ( const expandVector other  ) 

copy data of "other" functor.

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

Reimplemented from lti::functor.

vector<float>& lti::expandVector::draw ( const vector< float > &  in,
vector< float > &  out,
double(*)(double)  g = intPow2m 
) const

short cut for apply and parameters.

This function "draw" the input vector on the output vector, using the given function, i.e. out(g(x)) = in(x). Between the samples g(x) and g(x+1) linear interpolation will be used.

Parameters:
in input vector
out output vector
g mapping function
vector<double>& lti::expandVector::draw ( const vector< double > &  in,
vector< double > &  out,
double(*)(double)  g = intPow2m 
) const

short cut for apply and parameters.

This function "draw" the input vector on the output vector, using the given function, i.e. out(g(x)) = in(x). Between the samples g(x) and g(x+1) linear interpolation will be used.

Parameters:
in input vector
out output vector
g mapping function
const parameters& lti::expandVector::getParameters (  )  const

returns used parameters

Reimplemented from lti::functor.

virtual const char* lti::expandVector::getTypeName (  )  const [virtual]

returns the name of this type ("expandVector")

Reimplemented from lti::functor.

static double lti::expandVector::intPow2m ( double  x  )  [static]

this function evaluates (2^floor(x))-1


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

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