public class GeneralFunction extends AbstractFunction
Function. Pass a lambda expression representing the function to the constructor
to quickly obtain a concrete AbstractFunction instead of writing a new class that extends AbstractFunction.| Constructor and Description |
|---|
GeneralFunction(Function f) |
GeneralFunction(Function f,
Function df) |
| Modifier and Type | Method and Description |
|---|---|
double |
at(double point)
Compute and return the value of the function at the given point.
|
void |
setDf(Function df)
Set the derivative of this function.
|
double |
slopeAt(double point)
Compute and return the slope at the given point.
|
functionEvaluations, slopeAt, slopeEvaluationspublic GeneralFunction(Function f)
public double at(double point)
Functionpoint - the point at which to evaluate the function.public double slopeAt(double point)
AbstractFunctionslopeAt in class AbstractFunctionpoint - an element of the function's domain.public void setDf(Function df)
df - the derivative of this function.