public final class CubicFunction extends AbstractFunction
| Constructor and Description |
|---|
CubicFunction(double a,
double b,
double c,
double d)
Create a new cubic function using the given coefficients.
|
CubicFunction(Real a,
Real b,
Real c,
Real d)
Create a new cubic function using the given coefficients.
|
| Modifier and Type | Method and Description |
|---|---|
Real |
a()
retrieve the coefficient of the leading term of the polynomial.
|
double |
at(double x)
Compute and return the value of the function at the given point.
|
Real |
at(Real point)
Evaluate this function at the given point and return the result.
|
Real |
b()
retrieve the coefficient of the second degree term of the polynomial.
|
Real |
c()
retrieve the coefficient of the first degree term of the polynomial.
|
Real[] |
coefficients()
retrieve the coefficients of the polynomial.
|
double[] |
coefficientsDbl()
retrieve the coefficients of the polynomial as primitives.
|
Real |
d()
retrieve the constant term of the polynomial.
|
boolean |
hasMaximum()
Indicates if this function has a maximum or not.
|
boolean |
hasMinimum()
Indicates if this function has a minimum or not.
|
Real[] |
localExtrema()
retrieve the local extrema of this function.
|
Real[] |
localExtremePoints()
retrieve the points at which the local extrema of this function occur.
|
double |
slopeAt(double x)
Compute and return the slope at the given point.
|
String |
toString() |
functionEvaluations, slopeAt, slopeEvaluationspublic CubicFunction(Real a, Real b, Real c, Real d)
a - the coefficient of the leading term of the polynomial.b - the coefficient of the second degree term of the polynomial.c - the coefficient of the first degree term of the polynomial.d - the constant term of the polynomial.public CubicFunction(double a,
double b,
double c,
double d)
a - the coefficient of the leading term of the polynomial.b - the coefficient of the second degree term of the polynomial.c - the coefficient of the first degree term of the polynomial.d - the constant term of the polynomial.public Real a()
public Real b()
public Real c()
public Real d()
public Real at(Real point)
point - the point to evaluate the function at.public double at(double x)
Functionx - the point at which to evaluate the function.public double slopeAt(double x)
AbstractFunctionslopeAt in class AbstractFunctionx - an element of the function's domain.public Real[] coefficients()
public double[] coefficientsDbl()
public Real[] localExtremePoints()
public Real[] localExtrema()
public boolean hasMinimum()
public boolean hasMaximum()