|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjphase.Poly
public class Poly
This class represents a polynomial.
| Constructor Summary | |
|---|---|
Poly()
` * Creates a Polynomial = 0.0. |
|
Poly(double[] cf)
Build a Plynomial with these coefficients |
|
| Method Summary | |
|---|---|
Poly |
addTerm(double coeff,
int n)
Adds this term: cf * t^n |
double |
evaluate(double x)
Returns the value of this polynomial at x. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Poly(double[] cf)
cf - Coefficientspublic Poly()
| Method Detail |
|---|
public Poly addTerm(double coeff,
int n)
coeff - Coefficient of the term to be addedn - Exponent of the term to be added
public double evaluate(double x)
x - evaluation point
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||