|
|||||||||
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 degreepublic Polynomial(int n, double[] tab)
int
- n, the degreedouble[]
- tab, the array of coefficientsMethod Detail |
public void construct(int n)
int
- n, the degreepublic void construct(int n, double[] tab)
int
- n, the degreedouble[]
- tab, the array of coefficientspublic double get(int i)
int
- i, the coefficient to getpublic 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.Object
public static void main(java.lang.String[] arfg)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |