Numerical Tools

Interface with the GNU Scientific Library. More...

Data Fitting

template<class T1, class T2>
Array< double > & linfit (Array< T1 > &x, Array< T2 > &y)
 Linear regression.
template<class T1, class T2, class T3>
Array< double > & linfit (Array< T1 > &x, Array< T2 > &y, Array< T3 > &w)
 Weighted linear regression.
template<class T1, class T2, class T3>
Array< double > & linfit2D (Array< T1 > &x, Array< T2 > &y, Array< T3 > &z)
 2D linear regression.
template<class T1, class T2>
Array< double > & polyfit (Array< T1 > &x, Array< T2 > &y, int n)
 Polynomial fit.

Fourrier transform and filtering

template<typename T>
Array< complex< T > > & fft_1D (Array< complex< T > > &cplxt, int direction=1)
 Return the complex fft (1D) of the complex array cplxt. Uses the mixed-radix algorithm. Works only with double, so far.
template<typename T>
Array< complex< T > > & fft_2D (Array< complex< T > > &cplxt, int direction=1)
 Return the complex fft (1D or 2D) of the complex array cplxt. Uses the mixed-radix algorithm. Works only with double, so far.
template<typename T>
Array< complex< T > > & lowPassFirstOrder (long n, T tau)
 Creates a low pass filter, returns the transfer function.
template<typename T>
Array< complex< T > > & highPassFirstOrder (long n, T tau)
 Creates a high pass filter, returns the transfer function.
template<typename T>
Array< complex< T > > & GaussianFilter (long n, T tau)
 Creates a low pass filter, returns the transfer function.
template<typename T>
Array< T > & filter_1D (Array< T > &t, Array< complex< double > > &filt)
 Filters a 1D signal with the provided filter transfer function.
template<typename T>
Array< T > & smooth (Array< T > &t, T tau)
 Smooth a 1D signal with a gaussian filter. It works properly at the boundaries.

Detailed Description

Interface with the GNU Scientific Library.


Function Documentation

template<class T1, class T2, class T3>
Array<double>& linfit ( Array< T1 > &  x,
Array< T2 > &  y,
Array< T3 > &  w 
) [inline]

Weighted linear regression.

/*Linear regression on the set of point defined by x & y: y=a+b*x

Parameters:
x : x Array,
y : y Array,
w : weigths.
Returns an Array containing [a b sum_sq ...]

template<class T1, class T2>
Array<double>& linfit ( Array< T1 > &  x,
Array< T2 > &  y 
) [inline]

Linear regression.

Linear regression on the set of point defined by x & y: y=a+b*x

Parameters:
x : x Array,
y : y Array.
Returns an Array containing [a b sum_sq ...]

template<class T1, class T2, class T3>
Array<double>& linfit2D ( Array< T1 > &  x,
Array< T2 > &  y,
Array< T3 > &  z 
) [inline]

2D linear regression.

/*Linear regression on the set of point defined by (x,y,z): z=a+b*x+c*y

Parameters:
x : x coordinates,
y : y coordinates,
z : z coordinates.
Returns an Array containing [a b c sum_sq]

template<class T1, class T2>
Array<double>& polyfit ( Array< T1 > &  x,
Array< T2 > &  y,
int  n 
) [inline]

Polynomial fit.

/*Linear regression on the set of point defined by x & y: y=c[0]+c[1]*x+...+c[n]*x^n

Parameters:
x : x Array,
y : y Array,
n : order of the polynome
Returns an Array containing [c[0]... c[n]]


Generated on Fri Oct 24 18:41:59 2008 for IDIL by  doxygen 1.5.5