This is a cpp function used for R function l0tf.
l0tf_c(y, k0, T0, max_steps)Numeric vector of inputs.
An integer specifying the desired order of the piecewise polyomial produced by the solution of the trend filtering problem.
Number of knots in the piecewise polynomial(breaks in the (k+1)-st derivative).
The maximum number of steps for the algorithm to take before termination.
Fitted value.
Dual coefficient.
Primal coefficient.
Wen,C., Wang, X., Shen, Y., and Zhang, A. (2017). "L0 trend filtering", technical report.