Class RadialBasisFunctionInterpolator

java.lang.Object
com.irurueta.numerical.interpolation.BaseRadialBasisFunctionInterpolator
com.irurueta.numerical.interpolation.RadialBasisFunctionInterpolator

public class RadialBasisFunctionInterpolator extends BaseRadialBasisFunctionInterpolator
Interpolates sparsely defined points of dimension "dim" using a Radial Basis Function.
  • Field Details

    • w

      private final com.irurueta.algebra.Matrix w
      Computed weights to compute interpolation from provided points.
    • fn

      private final RadialBasisFunction fn
      Radial basis function defining a value based on the distance of two points.
    • norm

      private final boolean norm
      Indicates 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 class BaseRadialBasisFunctionInterpolator
      Parameters:
      pt - dim-dimensional point where interpolation must be computed.
      Returns:
      result of interpolation.
      Throws:
      IllegalArgumentException - if provided point has an invalid length.