Spline fitting for smoothing and/or interpolation, using GSL's bspline routines. More...

#include <SplineFit.h>

Inheritance diagram for SplineFit:
Reference::Able Reference::HeapTracked

Public Member Functions

 SplineFit ()
 Default constructor.
 
virtual ~SplineFit ()
 Destructor.
 
void reset ()
 Clear all current data, results.
 
void set_order (int n)
 Set the degree of the fit.
 
int get_order ()
 Get the current degree.
 
void set_uniform_breaks (int nint)
 Set uniform breakpoints to span the data.
 
void add_data (double x, Estimate< double > y)
 Add a data point.
 
void compute ()
 Compute the fit using current data.
 
double evaluate (double x)
 Evaluate the fit solution at the given x.
 
double evaluate_deriv (double x)
 Evaluate the fit solution's derivative at the given x.
 
double get_rchi2 ()
 Get the reduced chi2 of the fit.
 
- Public Member Functions inherited from Reference::Able
 Able ()
 Default constructor.
 
 Able (const Able &)
 Copy constructor.
 
Ableoperator= (const Able &)
 Assignment operator.
 
virtual ~Able ()
 Destructor.
 
unsigned get_reference_count () const
 Returns the number of references there are to this.
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked ()
 Default constructor.
 
 HeapTracked (const HeapTracked &)
 Copy constructor.
 
HeapTrackedoperator= (const HeapTracked &)
 Assignment operator.
 
virtual ~HeapTracked ()
 Destructor.
 
bool __is_on_heap () const
 Return true if this instance is found in heap addresses.
 

Protected Member Functions

bool check_range (double x)
 Check if a requested x val is in the fit range.
 
void interval_check (bool fix=false)
 Check if spline intervals and data make sense.
 
void free_workspaces ()
 Free spline workspaces.
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 Add the address of a reference to this object. More...
 
void __dereference (bool auto_delete=true) const
 Remove the address of a reference to this object. More...
 

Protected Attributes

std::vector< double > x
 The x values for the fit.
 
std::vector< Estimate< double > > y
 The y values/errors for the fit.
 
std::vector< double > bp
 The spline breakpoints.
 
int order
 Spline order (0=const, 3=cubic, etc)
 
double chi2
 The fit chi2.
 
int ndof
 Fit NDOF.
 
bool calculated
 Has the fit been calculated?
 
gsl_vector * coeffs
 The fitted coeffs.
 
gsl_matrix * cov
 The fit cov matrix.
 
gsl_bspline_workspace * bwork
 bspline temp space
 

Additional Inherited Members

- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 Returns the current number instances in existence.
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 Records the addresses of new instances allocated on the heap.
 
static void operator delete (void *location, void *ptr)
 Placement delete overload to match the placement new overload.
 
static void operator delete (void *location)
 Regular delete overload.
 
static size_t get_heap_queue_size ()
 Return the number of heap addresses awaiting processing.
 

Detailed Description

Spline fitting for smoothing and/or interpolation, using GSL's bspline routines.


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

Generated using doxygen 1.8.17