public class PolynomialFunction2D extends Object implements Function2D, Serializable
y = a0 + a1 * x + a2 * x^2 + ... + an *
x^n. Instances of this class are immutable.| Constructor and Description |
|---|
PolynomialFunction2D(double[] coefficients)
Constructs a new polynomial function
y = a0 + a1 * x + a2 * x^2 +
... |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Tests this function for equality with an arbitrary object.
|
double[] |
getCoefficients()
Returns a copy of the coefficients array that was specified in the
constructor.
|
int |
getOrder()
Returns the order of the polynomial.
|
double |
getValue(double x)
Returns the function value.
|
int |
hashCode()
Returns a hash code for this instance.
|
public PolynomialFunction2D(double[] coefficients)
y = a0 + a1 * x + a2 * x^2 +
... + an * x^ncoefficients - an array with the coefficients [a0, a1, ..., an]
(null not permitted).public double[] getCoefficients()
public int getOrder()
public double getValue(double x)
getValue in interface Function2Dx - the x-value.public boolean equals(Object obj)
Copyright © 2001–2014 JFree.org. All rights reserved.