Class RadialBasisFunctionInterpolator
java.lang.Object
com.irurueta.numerical.interpolation.BaseRadialBasisFunctionInterpolator
com.irurueta.numerical.interpolation.RadialBasisFunctionInterpolator
Interpolates sparsely defined points of dimension "dim" using a Radial Basis Function.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RadialBasisFunction
Radial basis function defining a value based on the distance of two points.private final boolean
Indicates whether normalized Radial Basis Function (RBF) must be used or not.private final com.irurueta.algebra.Matrix
Computed weights to compute interpolation from provided points.Fields inherited from class com.irurueta.numerical.interpolation.BaseRadialBasisFunctionInterpolator
dim, n, pi, pts
-
Constructor Summary
ConstructorsConstructorDescriptionRadialBasisFunctionInterpolator
(com.irurueta.algebra.Matrix ptss, double[] valss, RadialBasisFunction func) Constructor.RadialBasisFunctionInterpolator
(com.irurueta.algebra.Matrix ptss, double[] valss, RadialBasisFunction func, boolean nrbf) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble
interpolate
(double[] pt) Returns the interpolated function value at a dim-dimensional point pt.Methods inherited from class com.irurueta.numerical.interpolation.BaseRadialBasisFunctionInterpolator
rad
-
Field Details
-
w
private final com.irurueta.algebra.Matrix wComputed weights to compute interpolation from provided points. -
fn
Radial basis function defining a value based on the distance of two points. -
norm
private final boolean normIndicates whether normalized Radial Basis Function (RBF) must be used or not.
-
-
Constructor Details
-
RadialBasisFunctionInterpolator
public RadialBasisFunctionInterpolator(com.irurueta.algebra.Matrix ptss, double[] valss, RadialBasisFunction func, boolean nrbf) throws InterpolationException 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.valss
- values of function at provided points. Must have the same length as the number of rows of provided points matrix.func
- function to be used as Radial Basis Function (RBF).nrbf
- true to normalize RBF, false otherwise.- Throws:
InterpolationException
- if provided points are redundant and result in a degenerate solution.IllegalArgumentException
- if provided values array does not match the number of points (rows) in provided matrix.
-
RadialBasisFunctionInterpolator
public RadialBasisFunctionInterpolator(com.irurueta.algebra.Matrix ptss, double[] valss, RadialBasisFunction func) throws InterpolationException 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.valss
- values of function at provided points. Must have the same length as the number of rows of provided points matrix.func
- function to be used as Radial Basis Function (RBF).- Throws:
InterpolationException
- if provided points are redundant and result in a degenerate solution.IllegalArgumentException
- if provided values array does not match the number of points (rows) in provided matrix.
-
-
Method Details
-
interpolate
public double interpolate(double[] pt) Returns the interpolated function value at a dim-dimensional point pt.- Specified by:
interpolate
in classBaseRadialBasisFunctionInterpolator
- Parameters:
pt
- dim-dimensional point where interpolation must be computed.- Returns:
- result of interpolation.
- Throws:
IllegalArgumentException
- if provided point has an invalid length.
-