Top Description Constructors Methods
org.apache.commons.math3.analysis.interpolation

public Class LinearInterpolator

extends Object
implements UnivariateInterpolator
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.analysis.interpolation.UnivariateInterpolator
Imports
org.apache.commons.math3.analysis.polynomials.PolynomialFunction, .PolynomialSplineFunction, org.apache.commons.math3.util.MathArrays, org.apache.commons.math3.exception.DimensionMismatchException, .NumberIsTooSmallException, .NonMonotonicSequenceException, org.apache.commons.math3.exception.util.LocalizedFormats

Implements a linear function for interpolation of real univariate functions.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public PolynomialSplineFunction

Returns:

a function which interpolates the data set
interpolate
(double[]
the arguments for the interpolation points
x
,
double[]
the values for the interpolation points
y
)

Implements org.apache.commons.math3.analysis.interpolation.UnivariateInterpolator.interpolate.

Deprecated as a consequence of PolynomialSplineFunction being deprecated.

Computes a linear interpolating function for the data set.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

LinearInterpolatorback to summary
public LinearInterpolator()

Method Detail

interpolateback to summary
public PolynomialSplineFunction interpolate(double[] x, double[] y) throws DimensionMismatchException, NumberIsTooSmallException, NonMonotonicSequenceException

Implements org.apache.commons.math3.analysis.interpolation.UnivariateInterpolator.interpolate.

Deprecated

as a consequence of PolynomialSplineFunction being deprecated. See corresponding docs for further information.

Computes a linear interpolating function for the data set.

Parameters
x:double[]

the arguments for the interpolation points

y:double[]

the values for the interpolation points

Returns:PolynomialSplineFunction

a function which interpolates the data set

Exceptions
DimensionMismatchException:
if x and y have different sizes.
NumberIsTooSmallException:
if the size of x is smaller than 2.
NonMonotonicSequenceException:
if x is not sorted in strict increasing order.