java.lang.Object
org.gvsig.vectorediting.lib.prov.editvertex.operation.SplineCalculator

public class SplineCalculator extends Object
Author:
fdiaz
  • Constructor Summary

    Constructors
    Constructor
    Description
    SplineCalculator(double[] y)
    The constructor calculates the second derivatives of the interpolating function at the tabulated points xi, with xi = (i, y[i]).
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    fn(int n, double t)
    Returns a cubic-spline interpolated value y for the point between point (n, y[n]) and (n+1, y[n+1), with t ranging from 0 for (n, y[n]) to 1 for (n+1, y[n+1]).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SplineCalculator

      public SplineCalculator(double[] y)
      The constructor calculates the second derivatives of the interpolating function at the tabulated points xi, with xi = (i, y[i]). Based on numerical recipes in C, http://www.library.cornell.edu/nr/bookcpdf/c3-3.pdf .
      Parameters:
      y - Array of y coordinates for cubic-spline interpolation.
  • Method Details

    • fn

      public double fn(int n, double t)
      Returns a cubic-spline interpolated value y for the point between point (n, y[n]) and (n+1, y[n+1), with t ranging from 0 for (n, y[n]) to 1 for (n+1, y[n+1]).
      Parameters:
      n - The start point.
      t - The distance to the next point (0..1).
      Returns:
      A cubic-spline interpolated value.