UnivariateLinearLsqFit< T, Function > Class Template Reference
Public Types
Public Member Functions
Protected Member Functions
- void reject (const MArray< T, 1 > &x, const MArray< T, 1 > &y, const MArray< T, 1 > &y_errors, const param_vec_type &p, MArray< T, 1 > &new_x, MArray< T, 1 > &new_y, MArray< T, 1 > &new_y_errors) const
- kappa-sigma reject values in input arrays based on current fit
Protected Attributes
Detailed Description
template<typename T, typename Function>
class UnivariateLinearLsqFit< T, Function >
Linear least-squares fit of data to a function with outlier rejection and iteration. The number of parameters is assumed known at compile time.
Function objects have to conform to a simple interface: (it is a template object in this example, but does not need to be).
template<typename T, typename Tpar, int N> class Poly1D { public: enum { NPar = N }; typedef Tpar param_vector_type; typedef T value_type;
// optional static void prettyPrint(ostream& os, const TPar& p);
// evaluate at location x
for parameter vector p
T operator()( const T x, const TPar& p ) const;
// return the n-th basis function evaluated at values in array x
MArray<T,1> get_nth_basis( const int n, const MArray<T,1>& x ) };
Member Typedef Documentation
template<typename T, typename Function>
Constructor & Destructor Documentation
template<typename T, typename Function>
template<typename T, typename Function>
Member Function Documentation
template<typename T, typename Function>
template<typename T , typename Function >
template<typename T , typename Function >
void UnivariateLinearLsqFit< T, Function >::reject |
( |
const MArray< T, 1 > & |
x, |
|
|
const MArray< T, 1 > & |
y, |
|
|
const MArray< T, 1 > & |
y_errors, |
|
|
const param_vec_type & |
p, |
|
|
MArray< T, 1 > & |
new_x, |
|
|
MArray< T, 1 > & |
new_y, |
|
|
MArray< T, 1 > & |
new_y_errors | |
|
) |
| | const [inline, protected] |
Field Documentation
template<typename T, typename Function>
template<typename T, typename Function>
template<typename T, typename Function>