This function recursively constructs the higher order splines
basis. Note that the function does not take into consideration the
order of the final basis function. The dimensions of the inputs
dicate this, and are updated in each iteration of the
recursion. The recursion ends once the row number of argument
bmat
reaches 1. This function was coded in accordance to
Carl de Boor's set of notes on splines, "B(asic)-Spline Basics".
splineUpdate(x, bmat, knots, i, current.order)
vector, the values at which to evaluate the basis function.
matrix. Each column of bmat
corresponds to an
element of argument x
. Each row corresponds to the
evaluation of basis component i
, i + 1
, .... The
recursive nature of splines requires that we initially evaluate
the basis functions for components i
, ..., i +
degree of spline
. Each iteration of the recursion reduces the
row of bmat
by 1. The recursion terminates once
bmat
has only a single row.
vector, the internal knots.
integer, the basis component of interest.
integer, the current order associated with the
argument bmat
.
vector, the evaluation of the spline at each value in
vector x
.