

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object com.isti.util.ErrorMessageMgr com.isti.util.math.CubicSpline
public class CubicSpline
Field Summary  

static double 
TRIG_ARG_MAX
Maximum value for magnitude of x, beyond which we approximate x/sinh(x) and x/tanh(x) by xexp(x). 
static double 
TRIG_ARG_MIN
Minimum value for magnitude of x, for such functions as xsinh(x), xtanh(x), xsin(x), and xtan(x) to have acceptable accuracy. 
Constructor Summary  

CubicSpline()

Method Summary  

double[] 
calcSpline(double[] t,
double[] y,
double tension,
double k,
double[] xValsArr)
Performs cubic spline interpolation. 
double[] 
fit(double[] t,
double[] y,
double k,
double tension,
boolean periodic)
Computes the array of second derivatives at the knots, i.e., internal data points. 
static double 
interpolate(double[] t,
double[] y,
double[] z,
double x,
double tension,
boolean periodic)
Computes an approximate ordinate value for a given abscissa value, given an array of data points (stored in t[] and y[], containing abscissa and ordinate values respectively), and z[], the array of 2nd derivatives at the knots (i.e. 
boolean 
isMonotonic(double[] t)
Checks whether an array of data points has monotonic values. 
static double 
quotient_sin_func(double x,
double y)
These two functions compute (6/y^2)(sinh(xy)/sinh(y)x) and (6/y^2)(sin(xy)/sin(y)x), via the first three terms of the appropriate power series in y. 
static double 
quotient_sinh_func(double x,
double y)
These two functions compute (6/y^2)(sinh(xy)/sinh(y)x) and (6/y^2)(sin(xy)/sin(y)x), via the first three terms of the appropriate power series in y. 
static double 
sin_func(double x)
These four functions compute (6/x^2)(1x/sinh(x)), (3/x^2)(x/tanh(x)1), (6/x^2)(1x/sin(x)), and (3/x^2)(x/tan(x)1) via the first three terms of the appropriate power series. 
static double 
sinh_func(double x)
These four functions compute (6/x^2)(1x/sinh(x)), (3/x^2)(x/tanh(x)1), (6/x^2)(1x/sin(x)), and (3/x^2)(x/tan(x)1) via the first three terms of the appropriate power series. 
static double 
sinh(double value)
Returns the hyperbolic sine of a double value. 
static double 
tan_func(double x)
These four functions compute (6/x^2)(1x/sinh(x)), (3/x^2)(x/tanh(x)1), (6/x^2)(1x/sin(x)), and (3/x^2)(x/tan(x)1) via the first three terms of the appropriate power series. 
static double 
tanh_func(double x)
These four functions compute (6/x^2)(1x/sinh(x)), (3/x^2)(x/tanh(x)1), (6/x^2)(1x/sin(x)), and (3/x^2)(x/tan(x)1) via the first three terms of the appropriate power series. 
static double 
tanh(double value)
Returns the hyperbolic tangent of a double value. 
Methods inherited from class com.isti.util.ErrorMessageMgr 

clearErrorMessageString, clearFetchedErrorMessage, enterErrorMessageString, getErrorMessageFlag, getErrorMessageString, getUnfetchedMessageFlag, setErrorMessageString 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Field Detail 

public static double TRIG_ARG_MIN
public static double TRIG_ARG_MAX
Constructor Detail 

public CubicSpline()
Method Detail 

public double[] calcSpline(double[] t, double[] y, double tension, double k, double[] xValsArr)
t
 abscissa "source" array of 'double' values.y
 ordinate "source" array of 'double' values.tension
 tension value for interpolation, use 0.0 as default
value: If tension=0 then a spline with tension reduces to a
conventional piecewise cubic spline. In the limits
tension>+infinity and tension>infinity, a spline with
tension reduces to a piecewise linear (`broken line')
interpolation. To oversimplify a bit, 1.0/tension is the
maximum abscissa range over which the spline likes to curve,
at least when tension>0. So increasing the tension far above
zero tends to make the spline contain short curved sections,
separated by sections that are almost straight. The curved
sections will be centered on the userspecified data points.
The behavior of the spline when tension<0 is altogether
different: it will tend to oscillate, though as
tension>infinity the oscillations are damped out.k
 boundary condition, use 1.0 as default value: Appears in
the two boundary conditions y''[0]=ky''[1] and y''[n]=ky''[n1].xValsArr
 array of "new" abscissa values to use with
interpolation ('double' values).
public double[] fit(double[] t, double[] y, double k, double tension, boolean periodic)
t
 abscissa array of 'double' values.y
 ordinate array of 'double' values.k
 boundary condition, use 1.0 as default value; appears in the
two boundary conditions y''[0]=ky''[1] and y''[n]=ky''[n1].tension
 tension value for interpolation.periodic
 true for periodic; false for nonperiodic.
public static double interpolate(double[] t, double[] y, double[] z, double x, double tension, boolean periodic)
public final boolean isMonotonic(double[] t)
t
 array of double values to be checked.
public static double sinh(double value)
double
value.
The hyperbolic sine of x is defined to be
(e^{x}  e^{x})/2
where e is Euler's number.
value
 The number whose hyperbolic sine is to be returned.
x
.public static double tanh(double value)
double
value.
The hyperbolic tangent of x is defined to be
(e^{x}  e^{x})/
(e^{x} + e^{x}),
in other words, sinh(x)/cosh(x). Note
that the absolute value of the exact tanh is always
less than 1.
value
 The number whose hyperbolic tangent is to be returned.
x
.public static double sinh_func(double x)
public static double tanh_func(double x)
public static double sin_func(double x)
public static double tan_func(double x)
public static double quotient_sinh_func(double x, double y)
public static double quotient_sin_func(double x, double y)


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 