R/utils.R
get_diff_mat.Rd
Construct a difference operator, of a given order, for use in trend filtering penalties.
get_diff_mat(p, k)
Dimension (number of columns) of the difference matrix.
Order of the difference matrix.
A sparse matrix of dimension (p - k) x p.