Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::Kernel::ChebyshevPolyFit Class Reference

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ChebyshevPolyFit()

Mantid::Kernel::ChebyshevPolyFit::ChebyshevPolyFit ( const size_t  n)

Constructor.

Parameters
nThe maximum degree of polynomial required (+1 for the zeroth-order term)

Definition at line 84 of file ChebyshevPolyFit.cpp.

◆ ~ChebyshevPolyFit()

Mantid::Kernel::ChebyshevPolyFit::~ChebyshevPolyFit ( )
default

Destructor.

Member Function Documentation

◆ operator()()

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.

Parameters
xsX values
ysY data points
wgtsWeights for each Y point
Returns

Definition at line 101 of file ChebyshevPolyFit.cpp.

References m_impl.

Member Data Documentation

◆ m_impl

std::unique_ptr<ChebyshevPolyFitImpl> Mantid::Kernel::ChebyshevPolyFit::m_impl
private

Definition at line 39 of file ChebyshevPolyFit.h.

Referenced by operator()().


The documentation for this class was generated from the following files: