|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJava.gui.Pppack_smooth
public class Pppack_smooth
Smoothing spline interpolation This class provides an interpolation/approximation facility to work with data.
Partly this code is a modification of fortran subroutine smooth (file smooth.f) from pppack library at Netlib (editor: Eric Grosse, master: netlib.bell-labs.com) Original code written by Alexander Sokolov, Department of Systems Ecology, Stockholm University, 1997 Modified by Peter Gennemark, Chalmers, May 2003
Field Summary | |
---|---|
double[] |
d1f
|
double[] |
d2f
|
double[] |
d3f
|
double[] |
f
Array of smoothed ordinates, corresponded to abscissae |
int |
lastElement
Number of data points |
double[] |
x
Array of data abscissae, assumed to be strictly increasing |
double[] |
y
Array of data ordinates, corresponded to abscissae |
Constructor Summary | |
---|---|
Pppack_smooth(double[] x,
double[] y,
double[] dy)
Constructs the spline class. |
Method Summary | |
---|---|
void |
calcSpline(boolean isApproximation,
double maxMeanDistance)
Constructs an interpolation/approximation function to given data (x(),y()). |
void |
calcSpline(double maxMeanDistance)
Constructs the cubic smoothing spline to given data (x(),y()). |
double |
get(double coord)
Calculates value of the function. |
double |
get(double coord,
int jderiv)
Calculates value of the function. |
double |
getf(int index,
int val)
Get value of variable f at position val for a certain derivative [0,1,2,3}. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int lastElement
public double[] x
public double[] y
public double[] f
public double[] d1f
public double[] d2f
public double[] d3f
Constructor Detail |
---|
public Pppack_smooth(double[] x, double[] y, double[] dy)
x
- x-valuesy
- y-valuesdy
- - estimate of uncertainty in data (positive)Method Detail |
---|
public void calcSpline(double maxMeanDistance)
maxMeanDistance
- is upper bound on the discrete weighted mean square distance of
the approximation from the datapublic void calcSpline(boolean isApproximation, double maxMeanDistance)
isApproximation
- is type of a function. If it is true
the approximative function will be made, otherwise -- a linear function.maxMeanDistance
- is upper bound on the discrete weighted mean square distance of
the approximation from the datapublic double get(double coord)
coord
- is a value of abscissa for searching function's value.
public double get(double coord, int jderiv)
coord
- is a value of abscissa for searching function's value.jderiv
- 0 or 1, function value (0) or first derivative (1)
public double getf(int index, int val)
index
- the indexval
- the position
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |