<< plq_fitzinf0_direct plq plq_gpa >>

CCA (Computational Convex Analysis) >> plq > plq_function

plq_function

Piecewise linear quadratic (plq) function description

Description

A plq function is a piecewise function, where each piece is either a linear or a quadratic polynomial. It is stored as the matrix, where each row represents one piece of the function.

Note that singleton indicator functions are given in a special form such that [x(1),0,0,c(1)] = I_{x(1)}(x) + c(1).

Examples

plqAbs = [0,0,-1,0;%inf,0,1,0]; // The function y = |x|
plqQuad = [%inf,1/5,-4/5,4/5];  // The function y = (x-2)^2 / 5 = (x^2 - 4*x + 4) / 5
plq_plot(plqAbs, plqQuad);      // Plot the functions together

See Also

Authors

Bryan Gardiner, University of British Columbia, BC, Canada


Report an issue
<< plq_fitzinf0_direct plq plq_gpa >>