public class LinearFunction extends FunctionBase
| Constructor and Description |
|---|
LinearFunction() |
LinearFunction(double[] coeffs) |
LinearFunction(double slope,
double intercept) |
| Modifier and Type | Method and Description |
|---|---|
LinearFunction |
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
|
double[] |
getCoefficients() |
Diff1FunctionNx1 |
getFunction() |
void |
setCoefficients(double[] coeffs) |
public LinearFunction()
public LinearFunction(double slope,
double intercept)
public LinearFunction(double[] coeffs)
public void setCoefficients(double[] coeffs)
public double[] getCoefficients()
public double eval(VectorNd x)
FunctionBaseeval in class FunctionBasepublic void evalDeriv(VectorNd df, VectorNd x)
FunctionBaseevalDeriv in class FunctionBasepublic Diff1FunctionNx1 getFunction()
getFunction in class FunctionBasepublic LinearFunction clone()
clone in interface Clonableclone in class FunctionBase