Object-oriented Scientific Computing Library: Version 0.910
Public Member Functions | Protected Member Functions | Protected Attributes
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_matrixX
 Workspace for spline fitting.
const gsl_vector * x
 Values of the independent variable.
gsl_matrixcov
 Covariance matrix.

Member Function Documentation

void gsl_smooth::set_x ( const gsl_vector *  ix) [inline]

Definition at line 95 of file gsl_smooth.h.

int gsl_smooth::init ( ) [protected]

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.