GemaCoreLib
The GeMA Core library
gmNnInterpolatorObject.h
Go to the documentation of this file.
1 /************************************************************************
2 **
3 ** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4 ** All rights reserved.
5 **
6 ** This file is part of the "GeMA" software. It's use should respect
7 ** the terms in the license agreement that can be found together
8 ** with this source code.
9 ** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10 ** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11 ** A PARTICULAR PURPOSE.
12 **
13 ************************************************************************/
14 
24 #ifndef _GEMA_NN_INTERPOLATOR_OBJECT_H_
25 #define _GEMA_NN_INTERPOLATOR_OBJECT_H_
26 
27 #include "gmInterpolator.h"
28 
31 {
32 public:
33 
34  // See comments on the base class
35  virtual GmInterpolatorType type() const { return GM_NN_INTERPOLATOR; }
36 
37  virtual bool typeParamIsValid(const QVariant& v) const;
38  virtual QString typeParamToStr (const QVariant& v) const;
39 
40  // See comments on the base class
42  {
44  }
45 
46  virtual bool distanceBasedWeights(GmInterpolatorCoordinateSetBinding* pointSet, const GmVector& coord,
47  const GmVector& squaredDistances, const QVariant& typeParam,
48  GmVector& weights) const;
49 };
50 
51 
52 #endif
Interpolated value is equal to the value of the closest known value from the interpolation point....
Definition: gmInterpolator.h:76
virtual bool supportsInterpolatorKind(GmInterpolatorKind kind) const
Returns whether this interpolator object supports the given interpolator kind or not.
Definition: gmNnInterpolatorObject.h:41
Implements the Nearest Neighbor interpolation method.
Definition: gmNnInterpolatorObject.h:30
GmInterpolatorKind
Enum identifying the types of available interpolation classes.
Definition: gmInterpolator.h:47
Classes for interpolating values in cell nodes to points inside the cell.
Definition: gmInterpolator.h:49
GmInterpolatorType
Available interpolation methods. Not every method is suitable for every kind of interpolator class....
Definition: gmInterpolator.h:62
Classes for interpolating values in Gauss points to element points.
Definition: gmInterpolator.h:51
Interface class for the implementation of each of the possible interpolation algorithms available in ...
Definition: gmInterpolator.h:139
virtual bool distanceBasedWeights(GmInterpolatorCoordinateSetBinding *pointSet, const GmVector &coord, const GmVector &squaredDistances, const QVariant &typeParam, GmVector &weights) const
Worker function for the default implementation of interpolationWeights(). This is the function that n...
Definition: gmInterpolator.h:185
#define GMC_API_EXPORT
Macro for controling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_LI...
Definition: gmCoreConfig.h:35
Basic interface for a set storing point cartesian coordinates. This set can be filled with points fro...
Definition: gmInterpolatorCoordinateBindings.h:71
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition: gmVector.h:34
virtual QString typeParamToStr(const QVariant &v) const
Converts an interpolator type parameter to a string.
Definition: gmInterpolator.h:149
Declaration of the GmInterpolator and GmInterpolatorObject classes.
virtual bool typeParamIsValid(const QVariant &v) const
Is the given interpolator type parameter valid? The default implementation accepts only empty variant...
Definition: gmInterpolator.h:146
virtual GmInterpolatorType type() const
Returns the interpolator object type.
Definition: gmNnInterpolatorObject.h:35
Classes for interpolating values in a point cloud to another point.
Definition: gmInterpolator.h:52