![]() |
GemaCoreLib
The GeMA Core library
|
Implements the Inverse Distance Weighted interpolation method. More...
#include <gmIdwInterpolatorObject.h>
Public Member Functions | |
virtual GmInterpolatorType | type () const |
Returns the interpolator object type. | |
virtual bool | typeParamIsValid (const QVariant &v) const |
Accepts as valid parameter a real number different from 0.0 or an empty parameter. | |
virtual QString | typeParamToStr (const QVariant &v) const |
Converts an interpolator type parameter to a string. | |
virtual bool | supportsInterpolatorKind (GmInterpolatorKind kind) const |
Returns whether this interpolator object supports the given interpolator kind or not. | |
virtual bool | distanceBasedWeights (GmInterpolatorCoordinateSetBinding *pointSet, const GmVector &coord, const GmVector &squaredDistances, const QVariant &typeParam, GmVector &weights) const |
Implements the GmInterpolatorObject::distanceBasedWeights() virtual function to calculate interpolation weights by the IDW method. More... | |
![]() | |
virtual bool | requiresElement () const |
Does this interpolator object requires that the coordinate set provided to interpolationWeights() contains points from a single element, whose identity can be queried by a call to GmCoordinateSet::cell()? Default = false. | |
virtual bool | requiresMesh () const |
Does this interpolator object requires that the coordinate set provided to interpolationWeights() contains information about the underlying mesh, whose identity can be queried by a call to GmCoordinateSet::mesh()? Default = false. | |
virtual bool | requiresNaturalCoordinates () const |
Does this interpolator object requires that the coordinate passed as parameter to interpolationWeights() be expressed in natural coordinates? By default this is false and the provided coordinate should be cartesian coordinates. | |
virtual bool | interpolationWeights (GmInterpolatorCoordinateSetBinding *pointSet, const GmVector &coord, const QVariant &typeParam, GmVector &weights) const |
Basic function for calculating the interpolation weights that should be associated with each point (coordinate) in the given point set. More... | |
virtual const GmMatrix & | gaussToNodesExtrapolationMatrix (GmInterpolatorGaussCoordinateSetBinding *pointSet, const QVariant &typeParam, GmMatrix &weights) const |
Basic function for returning the extrapolation matrix used by the GM_GAUSS_TO_NODE_INTERPOLATOR interpolator kind. More... | |
Additional Inherited Members | |
![]() | |
GmInterpolatorObject () | |
Protected default constructor to make sure that Interpolator objects are created only by the GmInterpolator friend class. | |
Implements the Inverse Distance Weighted interpolation method.
In the Inverse Distance Weighted method the interpolated value is given by the sum of wi * vi, where vi is the value of each known point i and wi their associated weights. The value of wi is calculated by wi = 1/||xi - x||^p where ||xi - x|| is the euclidian distance between the known point i and the interpolated point x, p being a power parameter that can be given by the user (default = 2).
Following the GmInterpolatorObject interface, this class is responsible for calculating the weights wi associated to each of the known points used in the interpolation.
|
virtual |
Implements the GmInterpolatorObject::distanceBasedWeights() virtual function to calculate interpolation weights by the IDW method.
The typeParam parameter should be a double value with the power applied on the IDW formulation (see class description). If absent or zero, the default 2.0 will be used. See the documentation for GmInterpolatorObject::distanceBasedWeights() and GmInterpolatorObject::interpolationWeights() for aditional information on the function parameters.
Reimplemented from GmInterpolatorObject.