IT++ 4.3.1
poly.h
Go to the documentation of this file.
1
28
29#ifndef POLY_H
30#define POLY_H
31
32#include <itpp/base/vec.h>
33#include <itpp/itexports.h>
34
35namespace itpp
36{
37
46ITPP_EXPORT void poly(const vec &r, vec &p);
47inline vec poly(const vec &r) { vec temp; poly(r, temp); return temp; }
48ITPP_EXPORT void poly(const cvec &r, cvec &p);
49inline cvec poly(const cvec &r) { cvec temp; poly(r, temp); return temp; }
51
52
61ITPP_EXPORT void roots(const vec &p, cvec &r);
62inline cvec roots(const vec &p) { cvec temp; roots(p, temp); return temp; }
63ITPP_EXPORT void roots(const cvec &p, cvec &r);
64inline cvec roots(const cvec &p) { cvec temp; roots(p, temp); return temp; }
66
67
80ITPP_EXPORT vec polyval(const vec &p, const vec &x);
81ITPP_EXPORT cvec polyval(const vec &p, const cvec &x);
82ITPP_EXPORT cvec polyval(const cvec &p, const vec &x);
83ITPP_EXPORT cvec polyval(const cvec &p, const cvec &x);
85
106ITPP_EXPORT double cheb(int n, double x);
107
131ITPP_EXPORT vec cheb(int n, const vec &x);
132
156ITPP_EXPORT mat cheb(int n, const mat &x);
157} // namespace itpp
158
159#endif // #ifndef POLY_H
double cheb(int n, double x)
Chebyshev polynomial of the first kind.
Definition poly.cpp:195
vec polyval(const vec &p, const vec &x)
Evaluate polynomial.
Definition poly.cpp:135
void poly(const vec &r, vec &p)
Create a polynomial of the given roots.
Definition poly.cpp:40
void roots(const vec &p, cvec &r)
Calculate the roots of the polynomial.
Definition poly.cpp:66
itpp namespace
Definition itmex.h:37
Templated Vector Class Definitions.