|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--opale.mathtools.Polynomial
This class represents a Polynom with real coefficients. The storage of coefficients is full storage, i.e. all the coefficients are stored.
PolynomModel| Constructor Summary | |
Polynomial(int n)
Constructs a polynom of degree n initialized to zero. |
|
Polynomial(int n,
double[] tab)
Constructs a polynom of degree n, with the coefficients in the array tab. |
|
| Method Summary | |
void |
construct(int n)
Constructs a polynom of degree n initialized to zero. |
void |
construct(int n,
double[] tab)
Constructs a polynom of degree n, with the coefficients in the array tab. |
int |
deg()
Return the degree. |
double |
eval(double x)
Evaluates the polynom at the point x by the Horner's method. |
double |
get(int i)
Returns the coefficient 'i'. |
static void |
main(java.lang.String[] arfg)
|
void |
set(int i,
double x)
Sets the coefficient i with the value x. |
java.lang.String |
toString()
Generic méthod to print the polynom. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Polynomial(int n)
int - n, the degree
public Polynomial(int n,
double[] tab)
int - n, the degreedouble[] - tab, the array of coefficients| Method Detail |
public void construct(int n)
int - n, the degree
public void construct(int n,
double[] tab)
int - n, the degreedouble[] - tab, the array of coefficientspublic double get(int i)
int - i, the coefficient to get
public void set(int i,
double x)
int - i, the coefficient to setdouble - x, the valuepublic int deg()
public double eval(double x)
double - x, the point xpublic java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] arfg)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||