latest version v1.9 - last update 10 Apr 2010 |
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>
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 |
expandVector & | copy (const expandVector &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
Static Public Member Functions | |
static double | intPow2m (double x) |
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".
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
other | the object to be copied |
virtual lti::expandVector::~expandVector | ( | ) | [virtual] |
destructor
vector<double>& lti::expandVector::apply | ( | const vector< double > & | src, | |
vector< double > & | dest | |||
) | const |
operates on a copy of the given parameters.
src | vector<double> with the source data. | |
dest | vector<double> where the result will be left. |
dest
. vector<float>& lti::expandVector::apply | ( | const vector< float > & | src, | |
vector< float > & | dest | |||
) | const |
operates on a copy of the given parameters.
src | vector<float> with the source data. | |
dest | vector<float> where the result will be left. |
dest
. operates on the given parameter.
srcdest | vector<double> with the source data. The result will be left here too. |
srcdest
. operates on the given parameter.
srcdest | vector<float> with the source data. The result will be left here too. |
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.
other | the functor to be copied |
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.
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.
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