<?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_gph"><info><pubdate>12-Oct-2009</pubdate></info><refnamediv><refname>plq_gph</refname><refpurpose>Convert a PLQ subdifferential model to a standard PLQ model.</refpurpose></refnamediv>

  <refsynopsisdiv>
    <title>Calling Sequence</title>
    <synopsis>plq = plq_gph(gph)</synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Parameters</title>

    <variablelist>
      <varlistentry>
        <term>gph</term>
        <listitem>
          <para>matrix.  The subdifferential of a PLQ function.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsection>

  <refsection>
    <title>Description</title>

    <para>
      Converts the graph of the subdifferential of a PLQ function into the corresponding PLQ data structure.  Uses the value of the function stored at each x value in gph and integrates across each segment.
    </para>

    <para>
      This function runs in linear time with respect to the number of points in the input graph.
    </para>

  </refsection>


  <refsection><title>Examples</title><programlisting role="example"><![CDATA[
// The indicator function I_[-1,1].
// Defined to be 0 inside [-1,1] and %inf outside.
gph = [-1, -1, 1, 1; ..
       -1, 0, 0, 1; ..
       %inf, 0, 0, %inf];
plq = plq_gph(gph),
// plq  =
// 
//  - 1.    0.    0.   Inf  
//    1.    0.    0.    0.  
//   Inf    0.    0.   Inf  

// A PLQ function:
//   x in [-1,1]: 0
//     otherwise: x^2 - 1
gph = [-2, -1, -1, 1, 1, 2; ..
       -4, -2, 0, 0, 2, 4; ..
       3, 0, 0, 0, 0, 3];
plq = plq_gph(gph),
// plq  =
// 
//  - 1.    1.    0.  - 1.  
//    1.    0.    0.    0.  
//   Inf    1.    0.  - 1.  
  ]]></programlisting></refsection>


  <refsection><title>See Also</title><simplelist type="inline">
      <member>
        <link linkend="gph_plq">gph_plq</link>
        <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>

</refentry>
