
Alpha Coefficients for Truncated Power Expansion of B-spline Basis
bspline_alpha_rule.Rd
Computes the coefficients \(\alpha_j\) in the truncated power representation of a B-spline basis function
of degree k
, valid for k = 0, 1, 2
. These coefficients allow the basis function to be expressed as a
linear combination of truncated power functions over the relevant knot interval.
Details
For:
k = 0
, returns \((1, -1)\) for the characteristic function over a single interval.k = 1
, returns a 3-vector corresponding to linear B-spline basis functions.k = 2
, returns a 4-vector for quadratic B-spline basis functions.
The function throws an error if any required knot difference is zero (i.e. repeated knots), or if k > 2
.
Examples
knots <- c(0, 1, 2, 3, 4, 5)
bspline_alpha_rule(knots, i = 1, k = 1)
#> [1] 1 -2 1