1 #ifndef __JMATH__JPOLYNOME__
2 #define __JMATH__JPOLYNOME__
17 namespace JPP {
using namespace JMATH; }
48 for (
double x; n != 0; --n) {
50 x = va_arg(ap,
double);
69 for (T i = __begin; i != __end; ++i)
85 for (const_iterator i = begin(); i != end(); ++i, z *= x) {
108 for (const_iterator i = begin(); ++i != end(); ++n, z *= x) {
129 for (const_iterator i = begin(); i != end(); ++i, ++n, z *= x) {
160 for (const_iterator i = begin(); ++i != end(); ++n) {
161 buffer.push_back(n * (*i));
179 for (const_iterator i = begin(); i != end(); ++i, ++n) {
180 buffer.push_back((*i) / (
double) n);
195 const double eps = std::numeric_limits<double>::min())
const
197 if (this->size() == P.size()) {
199 for (const_iterator p = this->begin(), q = P.begin(); p != this->end(); ++p, ++q) {
200 if (fabs(*p - *q) > eps) {
223 for (
double x; in >> x; ) {
240 for (JPolynome::const_iterator i =
object.begin(); i !=
object.end(); ++i) {
JPolynome getIntegral() const
Integral function.
JPolynome(int n,...)
Constructor.
friend std::istream & operator>>(std::istream &in, JPolynome &object)
Read polynome from input.
JPolynome(T __begin, T __end)
Constructor.
double operator()(const double x) const
Function value.
double getIntegral(const double x) const
Integral value.
Polynome function object.
friend std::ostream & operator<<(std::ostream &out, const JPolynome &object)
Write polynome to output.
JPolynome()
Default constructor.
double getDerivative(const double x) const
Derivative value.
double getValue(const double x) const
Function value.
bool equals(const JPolynome &P, const double eps=std::numeric_limits< double >::min()) const
Equality.
JPolynome getDerivative() const
Derivative function.