org.apache.commons.math3.analysis.interpolation

## Class AkimaSplineInterpolator

- java.lang.Object
- - org.apache.commons.math3.analysis.interpolation.AkimaSplineInterpolator

- All Implemented Interfaces:
    UnivariateInterpolator

      public class AkimaSplineInterpolator
      extends Object
      implements UnivariateInterpolator

  Computes a cubic spline interpolation for the data set using the Akima algorithm, as originally formulated by Hiroshi Akima in his 1970 paper "A New Method of Interpolation and Smooth Curve Fitting Based on Local Procedures." J. ACM 17, 4 (October 1970), 589-602. DOI=10.1145/321607.321609 http://doi.acm.org/10.1145/321607.321609

  This implementation is based on the Akima implementation in the CubicSpline class in the Math.NET Numerics library. The method referenced is CubicSpline.InterpolateAkimaSorted

  The `interpolate` method returns a `PolynomialSplineFunction` consisting of n cubic polynomials, defined over the subintervals determined by the x values, `x[0] < x[i] ... < x[n]`. The Akima algorithm requires that `n >= 5`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AkimaSplineInterpolator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `PolynomialSplineFunction` | `interpolate(double[] xvals, double[] yvals)` Computes an interpolating function for the data set.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AkimaSplineInterpolator

          public AkimaSplineInterpolator()

  - ### Method Detail

    - #### interpolate

          public PolynomialSplineFunction interpolate(double[] xvals,
                                             double[] yvals)
                                               throws DimensionMismatchException,
                                                      NumberIsTooSmallException,
                                                      NonMonotonicSequenceException

      Computes an interpolating function for the data set.
      Specified by:
        `interpolate` in interface `UnivariateInterpolator`
      Parameters:
        `xvals` - the arguments for the interpolation points
        `yvals` - the values for the interpolation points
      Returns:
        a function which interpolates the data set
      Throws:
        `DimensionMismatchException` - if `xvals` and `yvals` have different sizes.
        `NonMonotonicSequenceException` - if `xvals` is not sorted in strict increasing order.
        `NumberIsTooSmallException` - if the size of `xvals` is smaller than 5.

Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.