Next: , Previous: Copying, Up: Top


2 Introduction

BsplineEval This library implements the algorithms to evaluate a spline from its B-spline representation as described in the paper:

The Numerical Evaluation of a Spline from its B-Spline Representation by M. G. Cox. J. Inst. Maths. Applics (1978) 21, 135-143.

The Algorithm A, Algorithm B and Algorithm C as described in said paper are implemented. Moreover, the algorithm C with its associated derivatives and an optimized version of algorithm C with its derivatives are provided.

The functions Bspline_Algo_a and Bspline_Algo_b are the one dimensional spline evaluation from its B-spline representation using algorithm A and B, respectively.

The evaluation of s( theta, z ), where theta is periodic, from its normalized B-spline representation are implemented in the functions: Bspline_Algo_c, Bspline_Algo_c_derivs, Bspline_eval and Bspline_eval_derivs.

The functions Bspline_Algo_c and Bspline_Algo_c_derivs allow the user to set the underlying algorithms used (algorithm 'a' or 'b'). Bspline_eval and Bspline_eval_derivs are the optimized versions of Bspline_Algo_c and Bspline_Algo_c_derivs, respectively.

Functions with a _derivs suffix also evaluates the derivatives with respect to theta and z. The results of the B-spline evaluation and its derivatives are stored in the structure:

     typedef struct {
     
       double s                                                 /* s( theta, z ) */;
       double dsdz                                        /* ds( theta, z ) / dz */;
       double dsdt                                             /* ds( theta, t ) */;
     
     } BsplineResult;