Class BaseRadialBasisFunctionInterpolator
java.lang.Object
com.irurueta.numerical.interpolation.BaseRadialBasisFunctionInterpolator
- Direct Known Subclasses:
RadialBasisFunctionInterpolator
,ShepardInterpolator
Base class for interpolation methods based on Radial Basis Functions to interpolate sparse
points.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final int
Dimension of points to be interpolated.protected final int
Number of points provided in a matrix as a basis for interpolation.protected final double[]
ith point to make comparisons.protected final com.irurueta.algebra.Matrix
Matrix containing points to interpolate from. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BaseRadialBasisFunctionInterpolator
(com.irurueta.algebra.Matrix ptss) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionabstract double
interpolate
(double[] pt) Returns the interpolated function value at a dim-dimensional point pt.protected double
rad
(double[] p1, double[] p2) Computes the euclidean distance between two points.
-
Field Details
-
dim
protected final int dimDimension of points to be interpolated. -
n
protected final int nNumber of points provided in a matrix as a basis for interpolation. -
pts
protected final com.irurueta.algebra.Matrix ptsMatrix containing points to interpolate from. Each row contains one point. Matrix will have n points (rows) having a dimension (columns) equal to dim. -
pi
protected final double[] piith point to make comparisons.
-
-
Constructor Details
-
BaseRadialBasisFunctionInterpolator
protected BaseRadialBasisFunctionInterpolator(com.irurueta.algebra.Matrix ptss) Constructor.- Parameters:
ptss
- Matrix containing points to interpolate from. Each row contains one point. Matrix will have n points (rows) having a dimension (columns) equal to dim.
-
-
Method Details
-
interpolate
public abstract double interpolate(double[] pt) Returns the interpolated function value at a dim-dimensional point pt.- Parameters:
pt
- dim-dimensional point where interpolation must be computed.- Returns:
- result of interpolation.
- Throws:
IllegalArgumentException
- if provided point has an invalid length.
-
rad
protected double rad(double[] p1, double[] p2) Computes the euclidean distance between two points.- Parameters:
p1
- first point.p2
- second point.- Returns:
- euclidean distance.
-