kwave
18.07.70
|
#include <Interpolation.h>
Classes | |
class | InterpolationMap |
Public Member Functions | |
Interpolation (Kwave::interpolation_t type=INTPOL_LINEAR) | |
virtual | ~Interpolation () |
bool | prepareInterpolation (const Kwave::Curve &points) |
QVector< double > | interpolation (const Kwave::Curve &points, unsigned int len) |
QVector< double > | limitedInterpolation (const Kwave::Curve &points, unsigned int len) |
double | singleInterpolation (double pos) |
double | singleLimitedInterpolation (double pos) |
void | setType (Kwave::interpolation_t t) |
Kwave::interpolation_t | type () |
Static Public Member Functions | |
static Kwave::interpolation_t | find (const QString &name) |
static QString | name (Kwave::interpolation_t type) |
static QStringList | descriptions (bool localized=false) |
static Kwave::interpolation_t | findByIndex (int index) |
Private Member Functions | |
unsigned int | count () |
void | createFullPolynom (const Kwave::Curve &points, QVector< double > &x, QVector< double > &y) |
void | get2Derivate (const QVector< double > &x, const QVector< double > &y, QVector< double > &ab, unsigned int n) |
void | createPolynom (const Kwave::Curve &points, QVector< double > &x, QVector< double > &y, int pos, unsigned int degree) |
Private Attributes | |
const Kwave::Curve * | m_curve |
QVector< double > | m_x |
QVector< double > | m_y |
QVector< double > | m_der |
Kwave::interpolation_t | m_type |
Static Private Attributes | |
static InterpolationMap | m_interpolation_map |
Interpolation types
Definition at line 47 of file Interpolation.h.
|
explicit |
|
virtual |
|
private |
Returns the number of points
Definition at line 81 of file Interpolation.cpp.
References m_curve.
Referenced by createFullPolynom(), createPolynom(), descriptions(), interpolation(), prepareInterpolation(), and singleInterpolation().
|
private |
???
points | curve with points for interpolation |
x | receives all x coordinates ??? |
y | receives all y coordinates ??? |
Definition at line 392 of file Interpolation.cpp.
References count(), and m_curve.
Referenced by interpolation(), and prepareInterpolation().
|
private |
???
points | curve with points for interpolation |
x | array of x coordinates |
y | array of y coordinates |
pos | ??? |
degree | ??? |
Definition at line 451 of file Interpolation.cpp.
References count().
Referenced by interpolation(), and singleInterpolation().
|
static |
Returns an alphabetically sorted list of verbose interpolation type names, useful for providing a list of available types in the gui.
localized | if true, the list will contain localized names (useful for filling combo boxes) |
Definition at line 62 of file Interpolation.cpp.
References Kwave::TypesMap< IDX, DATA >::count(), count(), Kwave::TypesMap< IDX, DATA >::description(), Kwave::TypesMap< IDX, DATA >::findFromData(), and m_interpolation_map.
Referenced by Kwave::CurveWidget::CurveWidget().
|
inlinestatic |
Returns the if of a type through it's name.
name | the short name of the interpolation, like used in a command |
Definition at line 83 of file Interpolation.h.
References name.
Referenced by Kwave::Curve::fromCommand().
|
inlinestatic |
Translates an index in an interpolation type
Definition at line 114 of file Interpolation.h.
Referenced by Kwave::CurveWidget::selectInterpolationType().
|
private |
???
x | array of x coordinates |
y | array of y coordinates |
ab | array for return values |
n | ??? |
Definition at line 420 of file Interpolation.cpp.
Referenced by interpolation(), and prepareInterpolation().
QVector< double > Kwave::Interpolation::interpolation | ( | const Kwave::Curve & | points, |
unsigned int | len | ||
) |
Definition at line 221 of file Interpolation.cpp.
References count(), createFullPolynom(), createPolynom(), get2Derivate(), Kwave::INTPOL_LINEAR, Kwave::INTPOL_NPOLYNOMIAL, Kwave::INTPOL_POLYNOMIAL3, Kwave::INTPOL_POLYNOMIAL5, Kwave::INTPOL_POLYNOMIAL7, Kwave::INTPOL_SAH, Kwave::INTPOL_SPLINE, m_type, and Kwave::toInt().
Referenced by Kwave::Curve::interpolation(), limitedInterpolation(), and Kwave::Curve::scaleFit().
QVector< double > Kwave::Interpolation::limitedInterpolation | ( | const Kwave::Curve & | points, |
unsigned int | len | ||
) |
Definition at line 209 of file Interpolation.cpp.
References interpolation().
|
static |
Returns the name of an interpolation (non-localized).
type | the type to get the name of |
Definition at line 75 of file Interpolation.cpp.
References m_interpolation_map, and Kwave::TypesMap< IDX, DATA >::name().
Referenced by Kwave::Curve::getCommand().
bool Kwave::Interpolation::prepareInterpolation | ( | const Kwave::Curve & | points | ) |
Definition at line 175 of file Interpolation.cpp.
References count(), createFullPolynom(), get2Derivate(), Kwave::INTPOL_NPOLYNOMIAL, Kwave::INTPOL_SPLINE, m_curve, m_der, m_type, m_x, and m_y.
Referenced by Kwave::Curve::interpolation().
|
inline |
Sets a new interpolation tpye
Definition at line 104 of file Interpolation.h.
Referenced by Kwave::Curve::setInterpolationType().
double Kwave::Interpolation::singleInterpolation | ( | double | pos | ) |
Returns a single point of the interpolation.
=0 per definition
Definition at line 87 of file Interpolation.cpp.
References count(), createPolynom(), Kwave::INTPOL_LINEAR, Kwave::INTPOL_NPOLYNOMIAL, Kwave::INTPOL_POLYNOMIAL3, Kwave::INTPOL_POLYNOMIAL5, Kwave::INTPOL_POLYNOMIAL7, Kwave::INTPOL_SAH, Kwave::INTPOL_SPLINE, m_curve, m_der, m_type, m_x, and m_y.
Referenced by Kwave::CurveStreamAdapter::goOn().
double Kwave::Interpolation::singleLimitedInterpolation | ( | double | pos | ) |
Same as getSingleInterpolation, but return value will be limited to be [0...1]
pos | ??? |
|
inline |
Returns the currently interpolation selected type
Definition at line 109 of file Interpolation.h.
Referenced by Kwave::Curve::getCommand(), Kwave::Curve::interpolationType(), and Kwave::Curve::scaleFit().
|
private |
List of points to be interpolated.
Definition at line 181 of file Interpolation.h.
Referenced by count(), createFullPolynom(), prepareInterpolation(), and singleInterpolation().
|
private |
??? used for temporary purposes
Definition at line 190 of file Interpolation.h.
Referenced by prepareInterpolation(), and singleInterpolation().
|
staticprivate |
Map with type and name of interpolations
Definition at line 193 of file Interpolation.h.
Referenced by descriptions(), Kwave::Interpolation::InterpolationMap::fill(), and name().
|
private |
Type of the interpolation.
Definition at line 196 of file Interpolation.h.
Referenced by interpolation(), prepareInterpolation(), and singleInterpolation().
|
private |
??? used for temporary purposes
Definition at line 184 of file Interpolation.h.
Referenced by prepareInterpolation(), and singleInterpolation().
|
private |
??? used for temporary purposes
Definition at line 187 of file Interpolation.h.
Referenced by prepareInterpolation(), and singleInterpolation().