math.numerics
Class Interpolation

java.lang.Object
  extended by math.numerics.Interpolation

public class Interpolation
extends java.lang.Object

Class Interpolation defines simple interpolation algorithms. This class cannot be subclassed or instantiated because all methods are static.

Author:
Wolfgang Christian

Method Summary
static double legendre(double x, double[] xd, double[] yd)
          Legendre polynomial interpolation affineTransform a single point x.
static double linear(double x, double x0, double x1, double y0, double y1)
          Linear interpolation affineTransform a single point x.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

linear

public static double linear(double x,
                            double x0,
                            double x1,
                            double y0,
                            double y1)
Linear interpolation affineTransform a single point x.

Parameters:
x - double
x0 - double
x1 - double
y0 - double
y1 - double
Returns:
double

legendre

public static double legendre(double x,
                              double[] xd,
                              double[] yd)
Legendre polynomial interpolation affineTransform a single point x. Because Legendre polynomials tend to be ill behaved, this method should be used with care. A LegendrePolynomial object should be used if multiple interpolations are to be performed using the same data.

Parameters:
x - double
xd - double[] the x data
yd - double[] the y data
Returns:
double