public class Polynom extends Object
| Constructor and Description |
|---|
Polynom(int degree)
default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
evaluate(double x)
return the value of the polynom in a given point.
|
int |
getCoefficient(int pos)
return the coefficient at a given position.
|
void |
setCoefficient(int pos,
int coef)
set the coefficient at a position.
|
String |
toString()
provide a String representation of this polynom.
|
public Polynom(int degree)
degree - the degree of the polynompublic void setCoefficient(int pos,
int coef)
pos - the position (the power of the monom)coef - the coefficientpublic int getCoefficient(int pos)
pos - the positionpublic double evaluate(double x)
x - the pointCopyright © 2014–2022 ImageJ. All rights reserved.