## Class RationalFunctionInterpolation

• java.lang.Object
• net.finmath.marketdata2.interpolation.RationalFunctionInterpolation

• public class RationalFunctionInterpolation
extends Object
This class provides methodologies to interpolate given sample points by rational functions, that is, given interpolation points (xi,yi) the class provides a continuous function y = f(x) where
• f(xi) = yi and
• for xi < x < xi+1 the function is a fraction of two polynomes f(x) = (sum aj xj) / (sum bk xk).
This setup comprises linear interpolation (for which the function is C0) and cubic spline interpolation (for which the function is C1).
Version:
1.3
Author:
Christian Fries
• ### Nested Class Summary

Nested Classes
Modifier and Type Class Description
static class  RationalFunctionInterpolation.ExtrapolationMethod
static class  RationalFunctionInterpolation.InterpolationMethod
• ### Constructor Summary

Constructors
Constructor Description
RationalFunctionInterpolation​(double[] points, RandomVariable[] values)
Generate a rational function interpolation from a given set of points.
RationalFunctionInterpolation​(double[] points, RandomVariable[] values, RationalFunctionInterpolation.InterpolationMethod interpolationMethod, RationalFunctionInterpolation.ExtrapolationMethod extrapolationMethod)
Generate a rational function interpolation from a given set of points using the specified interpolation and extrapolation method.
• ### Method Summary

All Methods
Modifier and Type Method Description
RationalFunctionInterpolation.InterpolationMethod getInterpolationMethod()
Returns the interpolation method used.
RandomVariable getValue​(double x)
Get an interpolated value for a given argument x.
• ### Methods inherited from class java.lang.Object

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

• #### RationalFunctionInterpolation

public RationalFunctionInterpolation​(double[] points,
RandomVariable[] values)
Generate a rational function interpolation from a given set of points.
Parameters:
points - The array of the xi sample points of a function y=f(x).
values - The corresponding array of the yi sample values to the sample points xi.
• #### RationalFunctionInterpolation

public RationalFunctionInterpolation​(double[] points,
RandomVariable[] values,
RationalFunctionInterpolation.InterpolationMethod interpolationMethod,
RationalFunctionInterpolation.ExtrapolationMethod extrapolationMethod)
Generate a rational function interpolation from a given set of points using the specified interpolation and extrapolation method.
Parameters:
points - The array of the xi sample points of a function y=f(x).
values - The corresponding array of the yi sample values to the sample points xi.
interpolationMethod - The interpolation method to be used.
extrapolationMethod - The extrapolation method to be used.
• ### Method Detail

• #### getInterpolationMethod

public RationalFunctionInterpolation.InterpolationMethod getInterpolationMethod()
Returns the interpolation method used.
Returns:
Returns the interpolationMethod.
• #### getValue

public RandomVariable getValue​(double x)
Get an interpolated value for a given argument x.
Parameters:
x - The abscissa at which the interpolation should be performed.
Returns:
The interpolated value (ordinate).