public class QuadraticFunction extends AbstractFunction
| Constructor and Description |
|---|
QuadraticFunction(double a,
double b,
double c)
Create a new quadratic function using the given coefficients.
|
QuadraticFunction(Real a,
Real b,
Real c)
Create a new quadratic 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)
Compute and return the value of the function at the given point.
|
Real |
b()
retrieve the coefficient of the first degree term of the polynomial.
|
Real |
c()
retrieve the constant term of the polynomial.
|
Real[] |
coefficients()
retrieve the coefficients of the polynomial.
|
double[] |
coefficientsDbl()
retrieve the coefficients of the polynomial as primitives.
|
boolean |
equals(Object o) |
Real |
extremePoint()
retrieve the point at which the local extremum of this function occurs.
|
double |
extremePointDbl()
retrieve the point at which the local extremum of this function occurs as a primitive.
|
Real |
extremum()
retrieve the local extremum of this function.
|
double |
extremumDbl()
retrieve the local extremum of this function as a primitive.
|
int |
hashCode() |
boolean |
hasMaximum()
Indicates if this function has a maximum or not.
|
boolean |
hasMinimum()
Indicates if this function has a minimum or not.
|
double |
slopeAt(double x)
Compute and return the slope at the given point.
|
String |
toString() |
Complex[] |
zeros()
Compute and return the zeros, or roots, of this function.
|
functionEvaluations, slopeAt, slopeEvaluationspublic QuadraticFunction(Real a, Real b, Real c)
a - the coefficient of the leading term of the polynomial.b - the coefficient of the first degree term of the polynomial.c - the constant term of the polynomial.public QuadraticFunction(double a,
double b,
double c)
a - the coefficient of the leading term of the polynomial.b - the coefficient of the first degree term of the polynomial.c - the constant term of the polynomial.public Complex[] zeros()
public Real a()
public Real b()
public Real c()
public Real at(Real point)
point - the point at which to evaluate the function.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 double extremePointDbl()
public Real extremePoint()
public double extremumDbl()
public Real extremum()
public boolean hasMinimum()
public boolean hasMaximum()