<?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="pl_lft_llt_3d"><info><pubdate>04-Apr-2006</pubdate></info><refnamediv><refname>pl_lft_llt_3d</refname><refpurpose>3D Legendre-Fenchel conjugate, LLT algorithm</refpurpose></refnamediv>
  
   
  
   
  
   
  
   
  
   

  
   <refsynopsisdiv><title>Calling Sequence</title><synopsis>Conj = pl_lft_llt_3d (Xr, Xc, Xt, f, Sr, Sc, St)
Conj = pl_lft_llt_2d (Xr, Xc, Xt, f, Sr, Sc, St, isConvex)</synopsis></refsynopsisdiv>

  
   <refsection><title>Parameters</title>
	  
      <variablelist>
		  
         <varlistentry>
			  
            <term>Xr</term>
			  
            <listitem>
				  
               <para>column vector of length n.
				  </para>
			  
            </listitem>
		  
         </varlistentry>
		  
		  
         <varlistentry>
			  
            <term>Xc</term>
			  
            <listitem>
				  
               <para>column vector of length m.
				  </para>
			  
            </listitem>
		  
         </varlistentry>
		  
		  
         <varlistentry>
			  
            <term>Xt</term>
			  
            <listitem>
				  
               <para>column vector of length k.
				  </para>
			  
            </listitem>
		  
         </varlistentry>
		  
		  
         <varlistentry>
			  
            <term>f</term>
			  
            <listitem>
				  
               <para>hypermatrix of size nxmxk. The function f is sampled on a grid Xr x Xc x Xt so f(i,j,k)=ff(Xr(i),Xc(j),Xt(k)) for some function ff.
				  </para>
			  
            </listitem>
		  
         </varlistentry>
		  
		  
         <varlistentry>
			  
            <term>Sr</term>
			  
            <listitem>
				  
               <para>column vector of size m1.
				  </para>
			  
            </listitem>
		  
         </varlistentry>
		  
		  
         <varlistentry>
			  
            <term>Sc</term>
			  
            <listitem>
				  
               <para>column vector of size m2.
				  </para>
			  
            </listitem>
		  
         </varlistentry>
		  
		  
         <varlistentry>
			  
            <term>St</term>
			  
            <listitem>
				  
               <para>column vector of size m3. The Conugate is computed on a grid SrxScxSt.
				  </para>
			  
            </listitem>
		  
         </varlistentry>
		  
		  
         <varlistentry>
			  
            <term>isConvex</term>
			  
            <listitem>
				  
               <para>Boolean, optional.  Whether or not the given function is known to be true.  Defaults to false.  It is passed to <link linkend="pl_lft_llt">pl_lft_llt</link>.
				  </para>
			  
            </listitem>
		  
         </varlistentry>
		  
		  
         <varlistentry>
			  
            <term>Conj</term>
			  
            <listitem>
				  
               <para>hypermatrix of size m1xm2xm3 containing the Conjugate of the function f.
				  </para>
			  
            </listitem>
		  
         </varlistentry>
	  
      </variablelist>
  
   </refsection>
 
  
   <refsection><title>Description</title>
     
         <para>
            Numerically compute the discrete Legendre transform on the grid Sr x Sc x St, given a function f(x,y,z) defined on a grid Xr x Xc x Xt, using the LLT1d algorithm to compute the conjugate in one dimension, then to compute it in the other dimension.  If n==length(Xr)==length(Xc)==length(Xt)==length(Sr)==length(Sc)==length(St), this function calls LLT1d n times in each of the three dimensions (3*n^3), giving a linear running time with respect to the O(n^3) input size.
     </para>
     
         <para>
	    The conjugate of a function in R^3 can be factored to several conjugates which are elements of R.
	 <!--<programlisting><![CDATA[
        f*(s(1),s(2)) =     Sup      [x(1)y(1) + x(2)y(2) + x(3)y(3) - f(x(1),x(2),x(3))]
                       x(1),x(2),x(3)
  
                      = Sup [s(1)x(1) + Sup [s(2)x(2) + Sup [s(3)x(3) - f(x(1),x(2),x(3))]]
                        x(1)            x(2)            x(3)
]]></programlisting>-->
			<para>
				<inlinemediaobject>
					<imageobject>
						<imagedata fileref="pl_ImagesOfEquationsByLatex/pl_lft_llt_3d/pl_lft_llt_3d_1.png"/>
					</imageobject>
				</inlinemediaobject>
			</para>
     
         </para>
  
   </refsection>

  
   <refsection><title>Examples</title><programlisting role="example"><![CDATA[
    Xr=(-2:0.25:2)'; 
    Xc=(-2:0.25:2)'; 
    Xt=(-2:0.25:2)'; 
    Sr=(-2:0.25:2)';
    Sc=(-2:0.25:2)';
    St=(-2:0.25:2)';
    deff('[z]=f(Xr,Xc,Xt)',['z= Xr^2 + 2*Xc^2 + 3*Xt^2']);
    z=zeros(length(Xr), length(Xc), length(Xt));
    for i=1:length(Xr),
        for j=1:length(Xc),
            for k=1:length(Xt),
                z(i,j,k) = f(Xr(i),Xc(j),Xt(k));
            end;
        end;
    end;
    result_llt = pl_lft_llt_3d (Xr, Xc, Xt, z, Sr, Sc, St, 0);
  ]]></programlisting></refsection>

  
   <refsection><title>See Also</title><simplelist type="inline">
    
      <member>
         <link linkend="pl_lft_llt">pl_lft_llt</link>
      </member>
    
      <member>
         <link linkend="pl_lft_llt_2d">pl_lft_llt_2d</link>
      </member>
  
   </simplelist></refsection>

  
   <refsection><title>Authors</title><para>
	  
      <literal>Mike Trienis</literal>, University of British Columbia, BC, Canada
  </para></refsection>

  
   <refsection><title>Used Functions</title>
     
      <para>
       
         <link linkend="pl_lft_llt">pl_lft_llt</link> is called three times, once for each dimension.
     </para>
  
   </refsection>

</refentry>
