Transform a Spline Design Matrix in block compressed form
block_design(X, degree)
X
: The design matrix, as given by splines2::bSpline
.degree
: Degree of the spline regression, as used in function splines2::bSpline
.A matrix B
with all non-zero entries of X
and a vector of indices alpha
representing the positions of the non-zero blocks of X
.