gsl_smooth Class Reference

Smooth a GSL vector using GSL bsplines. More...

#include <gsl_smooth.h>


Detailed Description

Todo:
Needs a bit more error checking and more documentation.
Idea for future:
Generalize to generic vector types. (Does this require reworking the GSL linear fitting routines?) In the meantime, make a ovector interface.
Idea for future:
Possibly create a new gsl_bspline class which replaces the GSL bspline workspace
Idea for future:
Allow user to probe chi squared and the covariance?

Definition at line 53 of file gsl_smooth.h.


Public Member Functions

 gsl_smooth (const gsl_vector *ix)
 Begin using x-values from vector ix.
void set_ncoeff (int incoeffs)
 Set the number of coefficients.
void set_order (int order)
 Set order.
void set_pars (int incoeffs, int order)
 Set parameters.
void set_x (const gsl_vector *ix)
 Set the x-values.
int smooth_data (const gsl_vector *y, const gsl_vector *e, gsl_vector *ys)
 Smooth data in y with errors e returning result ys.
int smooth_data (const gsl_vector *y, gsl_vector *ys)
 Smooth data in y returning result ys.

Protected Member Functions

int fit (const gsl_vector *y)
 Construct un-weighted fit.
int fit_errors (const gsl_vector *y, const gsl_vector *e)
 Construct weighted fit.
double calc_for_x (double xi)
 calculate smoothed curve value for a certain xi
int init ()
 Allocate memory and initialize splines.
void init_pointers_and_defs ()
 Set default values and zero pointers.
int free ()
 Free memory.

Protected Attributes

size_t ncoeffs
 Number of free coefficients for spline.
size_t norder
 Order of spline to be used (4=cubic).
size_t nbreak
 internally calculated, number of "segment" to split the data into
bool x_set
 True of the x values have been set.
gsl_bspline_workspace * bw
 Spline workspace.
gsl_vector * B
 Spline temporary vector.
gsl_vector * c
 Parameters of linear fit, y=X*c.
gsl_multifit_linear_workspace * mw
 Linear fit workspace.
gsl_matrix * X
 Workspace for spline fitting.
const gsl_vector * x
 Values of the independent variable.
gsl_matrix * cov
 Covariance matrix.

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

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page