Piecewise linear quadratic (plq), projection of a (not necessarily convex) function on the set of plq (convex) functions
[plq,d] = plq_proj(f,x,p)
matrix. A plq function.
float. distance between the function f and its projection plq functions d=||f-plq||_p.
vector of size n. The values of the function f on the grid x: f=f(x(i)).
vector of size n. The grid on which the function f is evaluated: f=f(x(i)).
integer. The norm for which the projection is computed. p=1, 2, or %inf for the norm ||.||_p.
Computes the projection of the function f on the cone of plq convex functions. Return the result as a plq function.
The computation assumes the function f is sampled on the uniform grid x. The values of the projection are computed by solving the optimization problem: min ||f-u||_p such that u is convex For the L_2 norm, a quadratic program with linear constraints is solved.
Yves Lucet
, University of British Columbia, BC, Canada