|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.analysis.PolynomialFunction
Represents a Polynomial function. Spline functions map a certain interval of real numbers to real numbers. A cubic spline consists of segments of cubic functions. For this class, polynominal coefficents are used. Arguments outside of the domain cause an IllegalArgumentException.
Constructor Summary | |
PolynomialFunction(double[] c)
Construct a function with the given segment delimiters and polynomial coefficients. |
Method Summary | |
double |
firstDerivative(double x)
Compute the value for the first derivative of the function. |
double |
secondDerivative(double x)
Compute the value for the second derivative of the function. |
double |
value(double x)
Compute the value for the function. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PolynomialFunction(double[] c)
c
- polynominal coefficientsMethod Detail |
public double value(double x) throws MathException
This can be explicitly determined by c_n * x^n + ... + c_1 * x + c_0
value
in interface UnivariateRealFunction
x
- the point for which the function value should be computed
MathException
- if the function couldn't be computed due to
missing additional data or other environmental problems.UnivariateRealFunction.value(double)
public double firstDerivative(double x) throws MathException
This can be explicitly determined by n * c_n * x^(n-1) + ... + 2 * c_2 * x + c_1
x
- the point for which the first derivative should be computed
MathException
- if the derivative couldn't be computed.public double secondDerivative(double x) throws MathException
This can be explicitly determined by n * (n-1) * c_n * x^(n-2) + ... + 3 * 2 * c_3 * x + 2 * c_2
x
- the point for which the first derivative should be computed
MathException
- if the second derivative couldn't be computed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |