Next: , Previous: Library Routines, Up: Library Routines


4.1 BsplineAlgo_a

BsplineAlgo_a – The evaluation of s(x) from its normalized B-spline representation using Scheme A (repeated convex combinations).

Synopsis

     #include <BsplineEval/bsplineval.h>
     #include <BsplineEval/spline_coef.h>
     
     
     
BsplineErr BsplineAlgo_a( double x, size_t j_index, size_t order, double *c, double *d, double *knot, double *result );

Parameters

double x
The point to evaluate the B-spline at
size_t j_index
knot[ j_index-1 ] <= x < knot[ j_index ], j
size_t order
the order of the B-spline, n
double *c
the B-spline coefficients, subscripted c
double *d
work space of dim : number of knots + order
double *knot
the B-spline knots, subscripted x
double *result
s(x)

Description

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

Returns

The enum BsplineErr.


Possible values for a BsplineErr are as follows:
Bspline_Success
Success
Bspline_OutOfRange
One of the arguments is out of range
Bspline_OutOfRangeT
The theta value is not within the limits of the t_knots
Bspline_OutOfRangeZ
The z value is outside the limits of the z_knots
Bspline_WrongMethod1
The method request must be one of : a, A, b or B
Bspline_WrongMethod2
The method request must be one of : a, A, b or B