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)
FunctionBase
eval
in class FunctionBase
public void evalDeriv(VectorNd df, VectorNd x)
FunctionBase
evalDeriv
in class FunctionBase
public Diff1FunctionNx1 getFunction()
getFunction
in class FunctionBase
public LinearFunction clone()
clone
in interface Clonable
clone
in class FunctionBase