<?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="opt_co">
  <info>
    <pubdate>17-May-2010</pubdate>
  </info>

  <refnamediv>
    <refname>opt_co</refname>
    <refpurpose>Convex operators via optimization (OPT), Convex hull</refpurpose>
  </refnamediv>

   <refsynopsisdiv>
     <title>Calling Sequence</title>
     <synopsis>[y, argmin] = opt_me(f, df, domf, x, output)</synopsis>
   </refsynopsisdiv>

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

       <varlistentry>
         <term>f</term>
         <listitem>
           <para>Univariate function, continuous but (potentially) nonsmooth.</para>
         </listitem>
       </varlistentry>

       <varlistentry>
         <term>df</term>
         <listitem>
           <para>Univariate function: derivative of f.</para>
         </listitem>
       </varlistentry>

       <varlistentry>
         <term>domf</term>
         <listitem>
           <para>Domain of the function f (set of points where the
           function is finite).  Domains are stored as intervals
           I=[lb,ub] with ub&lt;lb storing an empty set.</para>
         </listitem>
       </varlistentry>

       <varlistentry>
         <term>s</term>
         <listitem>
           <para>Vector of points at which to evaluate the convex hull.</para>
         </listitem>
       </varlistentry>

       <varlistentry>
         <term>output</term>
         <listitem>
           <para>0: no output, 1: progress bar.</para>
         </listitem>
       </varlistentry>

       <varlistentry>
         <term>y</term>
         <listitem>
           <para>The values of the convex hull evaluated at each x.</para>
         </listitem>
       </varlistentry>

       <varlistentry>
         <term>argmin</term>
         <listitem>
           <para>A point at which the convex hull attains its minimum, for
           each x.</para>
         </listitem>
       </varlistentry>

     </variablelist>
   </refsection>

   <refsection>
     <title>Description</title>

     <para>
       CURRENTLY BROKEN: NEED A NONCONVEX NONSMOOTH SOLVER (Neldermead
       in Scilab 5.2.0: fminsearch with infinite penalization or
       neldermead with Box complex algorithm). BUT optim WON'T WORK
       SINCE 'nd' IS A BUNDLE METHOD (only works for convex functions).
     </para>

     <para>
       Computes the convex hull of a (potentially) nonconvex function
       f, evaluated on vector s, giving the values y such that

       <!--<programlisting><![CDATA[
    y = (co f)(x)

      =    min     {(1-lambda) f(x1) + lambda f(x2) : lambda>=0, (1-lambda) x1 + lambda x2 = x} ,
       x1,x2,lambda
]]></programlisting>-->
			<para>
				<inlinemediaobject>
					<imageobject>
						<imagedata fileref="opt_ImagesOfEquationsByLatex/opt_co/opt_co_1.png"/>
					</imageobject>
				</inlinemediaobject>
			</para>
       <para>where x1,x2,lambda are vectors of the same dimension as x.</para>
     </para>
   </refsection>

   <refsection>
     <title>Authors</title>
     <para>
       <simplelist>
         <member>
           Yves Lucet, University of British Columbia, BC, Canada
         </member>
       </simplelist>
     </para>
   </refsection>

</refentry>
