<< plq_infconv_lft plq plq_isEqual >>

CCA (Computational Convex Analysis) >> plq > plq_isConvex

plq_isConvex

Piecewise linear quadratic (plq), convexity test

Calling Sequence

b = plq_isConvex(plqf)

Parameters

plqf

matrix. A PLQ function.

b

boolean. Whether or not plqf is a convex function.

Description

Determines whether or not plqf is a convex PLQ function, by testing whether it is equal to its convex hull. True is returned if and only if plqf is convex. This function runs in O(n) time, where n is the number of pieces in plqf.

Examples

plqf = [-1,1,0,-1; 1,0,0,0; %inf,1,0,-1];
plq_isConvex(plqf),
scf(); plq_plot(plqf);

plqf = [-3,1,8,16;0,0,-1,-2;3,0,1,-2;%inf,1,-8,16];
plq_isConvex(plqf),
scf(); plq_plot(plqf);

See Also

Authors

Bryan Gardiner, University of British Columbia, BC, Canada


Report an issue
<< plq_infconv_lft plq plq_isEqual >>