<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="plq_co">
  <info>
    <pubdate>18-May-2010</pubdate>
  </info>

  <refnamediv>
    <refname>plq_co</refname>
    <refpurpose>Piecewise linear quadratic (plq), Convex hull</refpurpose>
  </refnamediv>

   <refsynopsisdiv>
     <title>Calling Sequence</title>
     <synopsis>plqco = plq_coSplit(plqf [,method])</synopsis>
   </refsynopsisdiv>

   <refsection>
     <title>Parameters</title>
     <variablelist>

       <varlistentry>
         <term>plqf</term>
         <listitem>
           <para>matrix. A plq function whose convex hull will be computed.</para>
         </listitem>
       </varlistentry>

       <varlistentry>
         <term>method</term>
         <listitem>
           <para>optional string (default "direct"). Selects the algorithm used.  May be "direct" or "split".</para>
         </listitem>
       </varlistentry>

       <varlistentry>
         <term>plqco</term>
         <listitem>
           <para>matrix. A plq function that is the convex hull of the original function.</para>
         </listitem>
       </varlistentry>

     </variablelist>
   </refsection>

   <refsection>
     <title>Description</title>

     <para>
       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.
     </para>

     <para>
       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".
     </para>
   </refsection>

   <refsection>
     <title>Examples</title>
     <programlisting role="example"><![CDATA[
// 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);
]]></programlisting>
   </refsection>

   <refsection>
     <title>See Also</title>
     <simplelist type="inline">
       <member><link linkend="plq_coDirect">plq_coDirect</link></member>
       <member><link linkend="plq_coSplit">plq_coSplit</link></member>
       <member><link linkend="plq_function">plq_function</link></member>
   </simplelist></refsection>

   <refsection>
     <title>Authors</title>
     <para>
       <literal>Bryan Gardiner</literal>, University of British Columbia, BC, Canada
     </para>
   </refsection>

   <refsection>
     <title>Bibliography</title>
     <itemizedlist>
       <listitem>B. Gardiner, Y. Lucet, Submitted February 2010, Convex Hull Algorithms for Piecewise Linear-Quadratic Functions in Computational Convex Analysis.
       </listitem>
     </itemizedlist>
   </refsection>

</refentry>
