This is a cpp function used for R function l0gen.
l0gen_c(y, D, T0, max_steps, ddinv)Response sequence to be filtered.
Penalty matrix on coeffient beta.
Number of knots in the penalized coefficient(breaks in the D*beta), same as s.
The maximum number of steps for the algorithm to take before termination. Same as K.max.
The inverse matrix of D*t(D), could be NULL input.
Fitted value.
Dual coefficient.
Primal coefficient.
Wen,C., Wang, X., Shen, Y., and Zhang, A. (2017). "L0 trend filtering", technical report.