GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
GmMlsInterpolatorObject Class Reference

Implements the Moving Least Squares interpolation method. More...

#include <gmMlsInterpolatorObject.h>

Inheritance diagram for GmMlsInterpolatorObject:
Collaboration diagram for GmMlsInterpolatorObject:

Public Member Functions

virtual GmInterpolatorType type () const
 Returns the interpolator object type.
 
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 MLS method.
 
- Public Member Functions inherited from GmInterpolatorObject
virtual bool typeParamIsValid (const QVariant &v) const
 Is the given interpolator type parameter valid? The default implementation accepts only empty variants.
 
virtual QString typeParamToStr (const QVariant &v) const
 Converts an interpolator type parameter to a string.
 
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.

 
virtual const GmMatrixgaussToNodesExtrapolationMatrix (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.
 

Private Member Functions

bool checkColinearity (GmInterpolatorCoordinateSetBinding *pointSet) const
 Check collinearity: returns true if there is at least 3 non-collinear nodes in the point set.
 
bool checkCoplanarity (GmInterpolatorCoordinateSetBinding *pointSet) const
 Check coplanarity: returns true if there is at least 4 non-coplanar nodes in the point set.
 

Additional Inherited Members

- Protected Member Functions inherited from GmInterpolatorObject
 GmInterpolatorObject ()
 Protected default constructor to make sure that Interpolator objects are created only by the GmInterpolator friend class.
 

Detailed Description

Implements the Moving Least Squares interpolation method.

Moving least squares formulation:

w.t = p.t * inv( P.t * Phi * P) * P.t * Phi (1 x n) (1 x d+1) (d+1 x n) (n x n) (n x d+1) (d+1 x n) (n x n)

Where, considering n = number of known points and d = coordinate dimension:

  • w is the weight column vector (n x 1)
  • p is the (d+1 x 1) interpolation point coordinate vector with an added 1 in the beginning [1, x, y, z]
  • P is the (n x d+1) matrix with known point coordinates with an added 1 column at the beginning [[1, x1, y1, z1], [1, x2, y2, z2], ... [1, xn, yn, zn]]
  • Phi is the (n x n) diagonal matrix with the radial basis functions evaluated at the distance between the known point and the interpolation point [[rbf(|x - x1|), 0, 0 ...], [0, rbf(|x - x2|), 0, ...], ...]

Member Function Documentation

◆ distanceBasedWeights()

bool GmMlsInterpolatorObject::distanceBasedWeights ( GmInterpolatorCoordinateSetBinding * pointSet,
const GmVector & coord,
const GmVector & squaredDistances,
const QVariant & typeParam,
GmVector & weights ) const
virtual

Implements the GmInterpolatorObject::distanceBasedWeights() virtual function to calculate interpolation weights by the MLS method.

The typeParam parameter should be an integer specifying the RBF function to be used (see class description). If absent, the default XXXX will be used. See the documentation for GmInterpolatorObject::distanceBasedWeights() and GmInterpolatorObject::interpolationWeights() for additional information on the function parameters.

Reimplemented from GmInterpolatorObject.

◆ supportsInterpolatorKind()

virtual bool GmMlsInterpolatorObject::supportsInterpolatorKind ( GmInterpolatorKind kind) const
inlinevirtual

Returns whether this interpolator object supports the given interpolator kind or not.

Implements GmInterpolatorObject.

◆ type()

virtual GmInterpolatorType GmMlsInterpolatorObject::type ( ) const
inlinevirtual

Returns the interpolator object type.

Implements GmInterpolatorObject.


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