<< plq_clean plq plq_coDirect >>

CCA (Computational Convex Analysis) >> plq > plq_co

plq_co

Piecewise linear quadratic (plq), Convex hull

Calling Sequence

plqco = plq_coSplit(plqf [,method])

Parameters

plqf

matrix. A plq function whose convex hull will be computed.

method

optional string (default "direct"). Selects the algorithm used. May be "direct" or "split".

plqco

matrix. A plq function that is the convex hull of the original function.

Description

Computes the convex hull of a continuous, but not necessarily convex, plq function, where the input and output are given in the form of a plq matrix.

The method argument selects which algorithm to use. The default is to use the faster, linear-time plq_coDirect algorithm, denoted by "direct". The plq_coSplit algorithm, which is based on convex duality, may be used as well, by specifying "split".

Examples

// The hull of a linear-linear-quadratic function:
plqf = [0,0,0,%inf; 1,0,-1,1; 2,0,1,-1; 3,0,-1,3; 4,0,1,-3; %inf,0,0,%inf];
result = plq_co(plqf),
scf(); plq_plotMultiple(%f, %f, plqf, result);

// The hull of a more complicated function:
plqf = [-5,0,0,%inf; -4,0,0,4; -3,0,-1,0; -2,0,-2,-3; 0,0,-0.5,0; ..
        1,0,1,0; 2,0,0,1; 3,0,1,-1; 4,0,-1,5; 5,0,1,-3; 6,0,2,-8; ..
        6.5,0,0,4; %inf,0,2,-9];
result = plq_co(plqf),
scf(); plq_plotMultiple(%f, %f, plqf, result);

See Also

Authors

Bryan Gardiner, University of British Columbia, BC, Canada

Bibliography


Report an issue
<< plq_clean plq plq_coDirect >>