Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

rdSpline Class Reference

A class for representing smooth functions with b-splines. More...

#include <rdSpline.h>

List of all members.

Public Member Functions

virtual ~rdSpline ()
 Destructor.

 rdSpline (const char *aFileName)
 Construct a b-spline representation of a smooth function.

 rdSpline (FILE *aFP)
 Construct a b-spline representation of a smooth function.

int getKnotIndex (double x)
 Get the knot index for the interval in which x falls.

double evaluate (double x)
 Evaluate a spline at x.

void print ()
 Print a spline.


Private Member Functions

int initialize (FILE *aFP)
 Initialize spline based on the contents of a file.

void null ()
 NULL or zero data.

int checkFileStatus (int aStatus)
 Check the status of a file read.


Private Attributes

int _status
char _name [RDSPLINE_MAXSIZE]
double _ti
double _tf
int _order
int _nknots
int _ncoefs
double * _knots
double * _coefs
double * _tx
double * _b


Detailed Description

A class for representing smooth functions with b-splines.


Constructor & Destructor Documentation

rdSpline::rdSpline const char *  aFileName  ) 
 

Construct a b-spline representation of a smooth function.

Parameters:
aFileName Name of a valid spline file.

rdSpline::rdSpline FILE *  aFP  ) 
 

Construct a b-spline representation of a smooth function.

Parameters:
a pointer to an openned spline file.


Member Function Documentation

int rdSpline::checkFileStatus int  aStatus  )  [private]
 

Check the status of a file read.

Parameters:
aFileName Name of a valid spline file.

double rdSpline::evaluate double  x  ) 
 

Evaluate a spline at x.

This function is based on Matlab's spval.m.

2000_08_10 This routine assumes that the end knots have the proper multiplicity.

int rdSpline::getKnotIndex double  x  ) 
 

Get the knot index for the interval in which x falls.

If x does not fall within a valid interval, -1 is returned.

int rdSpline::initialize FILE *  aFP  )  [private]
 

Initialize spline based on the contents of a file.

Parameters:
aFileName Name of a valid spline file.


The documentation for this class was generated from the following files:
Generated on Wed Aug 20 02:17:12 2003 for Simulation Software by doxygen1.3