numRecipes
クラス Interpolation

java.lang.Object
  |
  +--numRecipes.Interpolation

public class Interpolation
extends java.lang.Object

Utilities to interpolate data points (x_i, y_i) (i=0,...). A function in form of y=f(x) is obtained by a given data points.


フィールドの概要
private static double delta
           
 
コンストラクタの概要
Interpolation()
           
 
メソッドの概要
static double getErrorInPolynominalInterpolate()
           
static double mThPolynominalInterpolate(double[] xa, double[] ya, int n, double x, int m)
          Interpolate with mTh pylinominal function.
static double polynominalInterpolate(double[] xa, double[] ya, double x)
          Given arrays xa[0....n-1] and ya[0....n-1], and given a value x, this method returns a value y by the polynominal interpolation.
static int searchIndex(double[] xx, double x, int n)
          Search the array index such that x is between xx[index] and xx[index+1]. xx must be monotonic, either increasing or decreasing. index =0 or index = n-1 is returned to indicate x is out of range.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

delta

private static double delta
コンストラクタの詳細

Interpolation

public Interpolation()
メソッドの詳細

searchIndex

public static int searchIndex(double[] xx,
                              double x,
                              int n)
Search the array index such that x is between xx[index] and xx[index+1]. xx must be monotonic, either increasing or decreasing. index =0 or index = n-1 is returned to indicate x is out of range. n gives number of the elements i.e. xx[0....n-1].


polynominalInterpolate

public static double polynominalInterpolate(double[] xa,
                                            double[] ya,
                                            double x)
Given arrays xa[0....n-1] and ya[0....n-1], and given a value x, this method returns a value y by the polynominal interpolation. Number of data ponts n is qeual to the plynominal of degree.


getErrorInPolynominalInterpolate

public static double getErrorInPolynominalInterpolate()

mThPolynominalInterpolate

public static double mThPolynominalInterpolate(double[] xa,
                                               double[] ya,
                                               int n,
                                               double x,
                                               int m)
Interpolate with mTh pylinominal function. The data arrays xa[0.....n-1] and ya[0....n-1] must be larger than m, polynominal of degree.