public class NaturalCubicSpline extends FunctionBase
Constructor and Description |
---|
NaturalCubicSpline() |
NaturalCubicSpline(double[] x,
double[] y) |
Modifier and Type | Method and Description |
---|---|
NaturalCubicSpline |
clone() |
double |
eval(VectorNd x)
Evaluates the function at the given input value
|
void |
evalDeriv(VectorNd df,
VectorNd x)
Evaluates the function derivative at the given input value
|
CubicHermiteSpline1d |
getFunction() |
static void |
main(java.lang.String[] args) |
void |
set(double[] x,
double[] y)
Sets the spline knot locations
|
double |
solveForNearestX(double fx,
double x,
double eps) |
int |
solveForX(double y,
java.util.List<java.lang.Double> x,
double eps) |
boolean |
validate()
Verify that endspoints and endpoint derivatives match
|
public NaturalCubicSpline()
public NaturalCubicSpline(double[] x, double[] y)
public boolean validate()
public void set(double[] x, double[] y)
x
- x locationy
- locationpublic double eval(VectorNd x)
FunctionBase
eval
in class FunctionBase
public void evalDeriv(VectorNd df, VectorNd x)
FunctionBase
evalDeriv
in class FunctionBase
public CubicHermiteSpline1d getFunction()
getFunction
in class FunctionBase
public int solveForX(double y, java.util.List<java.lang.Double> x, double eps)
public double solveForNearestX(double fx, double x, double eps)
public NaturalCubicSpline clone()
clone
in interface Clonable
clone
in class FunctionBase
public static void main(java.lang.String[] args)