public class ApproximationFunction extends java.lang.Object implements UnivariateFunction
Constructor and Description |
---|
ApproximationFunction(ApproximationType t,
double[] x,
double[] y,
double lo,
double hi,
double compromise) |
Modifier and Type | Method and Description |
---|---|
static double |
constant(double v,
double[] x,
double[] y,
double lo,
double hi,
double compromise)
Constant approximation
|
double |
eval(double x) |
static double |
linear(double v,
double[] x,
double[] y,
double lo,
double hi)
Linear approximation
|
void |
setObjects(java.lang.Object... obj) |
void |
setParameters(double... params) |
public ApproximationFunction(ApproximationType t, double[] x, double[] y, double lo, double hi, double compromise)
public double eval(double x)
eval
in interface UnivariateFunction
public void setParameters(double... params)
setParameters
in interface UnivariateFunction
public void setObjects(java.lang.Object... obj)
setObjects
in interface UnivariateFunction
public static final double linear(double v, double[] x, double[] y, double lo, double hi)
v
- x
- y
- lo
- hi
- public static final double constant(double v, double[] x, double[] y, double lo, double hi, double compromise)
v
- x
- y
- lo
- hi
- compromise
-