Encode any given function as a set of wavelet coefficients.
More...
#include <functionEncoder.h>
Encode any given function as a set of wavelet coefficients.
The father wavelet used here is the db4.
Definition at line 113 of file functionEncoder.h.
◆ WaveletEncoder()
WaveletEncoder::WaveletEncoder |
( |
| ) |
|
◆ ~WaveletEncoder()
WaveletEncoder::~WaveletEncoder |
( |
| ) |
|
|
virtual |
◆ decode()
double WaveletEncoder::decode |
( |
const Code & |
code, |
|
|
const double |
x |
|
) |
| |
|
virtual |
Compute the approximated value of function in x, given the input set of wavelet coefficients.
- Parameters
-
code | contains wavelet coefficients vector along with the first initial value f(0). |
x | is the point at which the result is computed. It shall be in [0,1]. |
- Returns
- the decoded function value.
- Note
- It shall hold that coefficients.length()>=floor(R)+2.
Implements iCub::ctrl::FunctionEncoder.
Definition at line 218 of file functionEncoder.cpp.
◆ encode()
Code WaveletEncoder::encode |
( |
const yarp::sig::Vector & |
values | ) |
|
|
virtual |
Encode the function.
- Parameters
-
values | is the vector containing the samples of function f to be encoded. The x coordinates of the points are intended to be normalized in [0,1], so that f(0)=values[0] and f(1)=values[values.length()-1]. |
- Returns
- the code containing the computed 1+N coefficients, with the first one being f(0) and the following N are the actual wavelet expansion coefficients.
Implements iCub::ctrl::FunctionEncoder.
Definition at line 195 of file functionEncoder.cpp.
◆ getEncoderOptions()
Property WaveletEncoder::getEncoderOptions |
( |
| ) |
|
|
virtual |
◆ interpFunction()
double WaveletEncoder::interpFunction |
( |
const yarp::sig::Vector & |
values, |
|
|
const double |
x |
|
) |
| |
|
protected |
◆ interpWavelet()
double WaveletEncoder::interpWavelet |
( |
const double |
x | ) |
|
|
protected |
◆ setEncoderOptions()
bool WaveletEncoder::setEncoderOptions |
( |
const yarp::os::Property & |
options | ) |
|
|
virtual |
Configure the encoder.
- Parameters
-
options | lets user specify the resolution R to which the encoding is computed. Accepted options are of the form ("resolution" <double>). |
- Returns
- true/false on success/fail.
- Note
- It holds that N=floor(R)+1, where N is the number of coefficients of the vector space. Recap that floor(.) is the round function towards minus infinity.
Implements iCub::ctrl::FunctionEncoder.
Definition at line 170 of file functionEncoder.cpp.
◆ waveletIntegrand
double waveletIntegrand |
( |
double |
x, |
|
|
void * |
params |
|
) |
| |
|
friend |
void* iCub::ctrl::WaveletEncoder::F |
|
protected |
◆ iCoeff
unsigned int iCub::ctrl::WaveletEncoder::iCoeff |
|
protected |
◆ pVal
const yarp::sig::Vector* iCub::ctrl::WaveletEncoder::pVal |
|
protected |
◆ resolution
double iCub::ctrl::WaveletEncoder::resolution |
|
protected |
void* iCub::ctrl::WaveletEncoder::w |
|
protected |
The documentation for this class was generated from the following files: