Data structure for representing 1D polynomials. More...
#include <Poly1d.h>
Public Member Functions | |
Poly1d (int ord, double mn, double nm) | |
Constructor. More... | |
Poly1d () | |
Empty constructor. | |
Poly1d (const Poly1d &p) | |
Copy constructor. | |
Poly1d & | operator= (const Poly1d &) |
Assignment operator. | |
void | setCoeff (int ind, double val) |
Set coefficient by index. More... | |
double | getCoeff (int ind) const |
Get coefficient by index. More... | |
double | eval (double x) const |
Evaluate polynomial at x. More... | |
void | printPoly () const |
Print for debugging. | |
Poly1d | derivative () const |
Return derivative of polynomial. | |
Public Attributes | |
int | order |
Order of the polynomial. | |
double | mean |
Mean of the polynomial. | |
double | norm |
Norm of the polynomial. | |
std::vector< double > | coeffs |
Coefficients of the polynomial. | |
Data structure for representing 1D polynomials.
Poly1D is function of the form
\[ f\left( x \right) = \sum_{i=0}^{N} a_i \cdot \left( \frac{x-\mu}{\sigma} \right)^i \]
where \(a_i\) represents the coefficients, \(\mu\) represents the mean and \(\sigma\) represents the norm
|
inline |
Constructor.
[in] | ord | Order |
[in] | mn | Mean |
[in] | nm | Norm |
double isce3::core::Poly1d::eval | ( | double | x | ) | const |
Evaluate polynomial at x.
[in] | x | Input x |
|
inline |
Get coefficient by index.
[in] | ind | Index to get |
|
inline |
Set coefficient by index.
[in] | ind | Index to set |
[in] | val | Coefficient value |