UnivariateLinearLsqFitLarge< T, Function > Class Template Reference

Public Types

Public Member Functions

Protected Attributes


Detailed Description

template<typename T, typename Function>
class UnivariateLinearLsqFitLarge< T, Function >

Linear least-squares fit of data to a function

Use this version for large data sets and when the number of parameters is NOT 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: typedef Tpar param_vector_type; typedef T value_type;

// get number of paramters int npar ();

// 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 )

// optional static void prettyPrint(ostream& os, const TPar& p); };


Member Typedef Documentation

template<typename T, typename Function>
typedef Function::Tpar UnivariateLinearLsqFitLarge< T, Function >::param_vec_type

Constructor & Destructor Documentation

template<typename T, typename Function>
UnivariateLinearLsqFitLarge< T, Function >::UnivariateLinearLsqFitLarge ( const Function &  F,
bool  quiet = true 
) [inline]
template<typename T, typename Function>
virtual UnivariateLinearLsqFitLarge< T, Function >::~UnivariateLinearLsqFitLarge (  )  [inline, virtual]

Member Function Documentation

template<typename T , typename Function >
UnivariateLinearLsqFitLarge< T, Function >::param_vec_type UnivariateLinearLsqFitLarge< T, Function >::fit ( const MArray< T, 1 > &  x,
const MArray< T, 1 > &  y,
const MArray< T, 1 > &  y_errors,
param_vec_type errors 
) const [inline]

Field Documentation

template<typename T, typename Function>
const Function& UnivariateLinearLsqFitLarge< T, Function >::F_ [protected]
template<typename T, typename Function>
bool UnivariateLinearLsqFitLarge< T, Function >::quiet_ [protected]

Generated on 4 Nov 2015 for CURE by  doxygen 1.6.1