|
Mantid
|
Compute a weighted least-squares polynomial approximations to an arbitrary set of data points. More...
#include <ChebyshevPolyFit.h>
Public Member Functions | |
| ChebyshevPolyFit (const size_t n) | |
| Constructor. More... | |
| std::vector< double > | operator() (const std::vector< double > &xs, const std::vector< double > &ys, const std::vector< double > &wgts) |
| Find coefficients of polynomial that minimizes the sum of the squares of the residuals: e_r = w_r(y_r - f_r) Solves the overdetermined equation w * V(x) * c = w * y. More... | |
| ~ChebyshevPolyFit () | |
| Destructor. More... | |
Private Attributes | |
| std::unique_ptr< ChebyshevPolyFitImpl > | m_impl |
Compute a weighted least-squares polynomial approximations to an arbitrary set of data points.
Each polynomial is represented in Chebyshev-series form. Equivalent to the NAG routine E02ADF - http://www.nag.co.uk/numeric/fl/manual/pdf/E02/e02adf.pdf
Definition at line 28 of file ChebyshevPolyFit.h.
| Mantid::Kernel::ChebyshevPolyFit::ChebyshevPolyFit | ( | const size_t | n | ) |
Constructor.
| n | The maximum degree of polynomial required (+1 for the zeroth-order term) |
Definition at line 84 of file ChebyshevPolyFit.cpp.
|
default |
Destructor.
| std::vector< double > Mantid::Kernel::ChebyshevPolyFit::operator() | ( | const std::vector< double > & | xs, |
| const std::vector< double > & | ys, | ||
| const std::vector< double > & | wgts | ||
| ) |
Find coefficients of polynomial that minimizes the sum of the squares of the residuals: e_r = w_r(y_r - f_r) Solves the overdetermined equation w * V(x) * c = w * y.
| xs | X values |
| ys | Y data points |
| wgts | Weights for each Y point |
Definition at line 101 of file ChebyshevPolyFit.cpp.
References m_impl.
|
private |
Definition at line 39 of file ChebyshevPolyFit.h.
Referenced by operator()().