plq_ncpa — Piecewise linear quadratic (plq), nonconvex proximal average
pa = plq_ncpa(p0, p1, lambda, r)
matrices. PLQ functions.
constant in [0,1]. lambda1 = 1 - lambda. lambda2 = lambda.
positive constant. Parameter to the Moreau envelope.
Computes the nonconvex proximal average of two (potentially nonconvex) PLQ functions p0 and p1, via the formula
PA[r,lambda1,lambda2](p0, p1) = -M[1/(r+lambda1*lambda2)] ( -lambda1 M[1/r](f) - lambda2 M[1/r](g) ),
where M[k] is the Moreau envelope with smoothing parameter k.
This algorithm runs in O(n + m) time, where n and m are the number of pieces in p0 and p1, respectively.