TABLE OF CONTENTS


CsplineUtils/csplinedesign [ Functions ]

NAME

    csplinedesign --- create a B-spline basis

FUNCTION

Compute a full B-spline basis given a set of knots and a set of points at which to evaluate the basis functions. Plays the role of spline_basis in the splines package.

SYNOPSIS

178 void csplinedesign(double *des, double *x, int *nx, double *knots, int *ord, int *K)

INPUTS

    des       matrix of size nx x (K+ord) to hold the output
    x         set of points at which to evaluate the basis functions
    nx        length of x
    knots     vector of knot points, with appropriate boundary knots
    ord       order of the spline
    K         number of interior knots

OUTPUTS

    des[i,j] contains the j-th B-spline basis function evaluated at x[i]

SOURCE

182 {
183     int nj= *K + *ord;
184     for(int i=0;i<*nx;i++){
185         for(int j=0; j< nj; j++)
186             des[i + j* *nx] = csplineeval( x[i], j, *ord, knots, *ord, nj);
187     }
188 }