<?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="op_fitz_direct"><info><pubdate>09-Jul-2008</pubdate></info><refnamediv><refname>op_fitz_direct</refname><refpurpose>[For comparison only] Evaluate the Fitzpatrick function of a given operator on a grid.</refpurpose></refnamediv>
  
   
  
   
  
   
  
   
  
   

  
   <refsynopsisdiv><title>Calling Sequence</title><synopsis>F = op_fitz_direct(A, n, x, xstar)</synopsis></refsynopsisdiv>

  
   <refsection><title>Parameters</title>
    
      <variablelist>
      
         <varlistentry>
        
            <term>A</term>
        
            <listitem>
          
               <para>matrix. An operator [a;a*] where a and a* are row vectors.
          </para>
        
            </listitem>
      
         </varlistentry>
      
         <varlistentry>
        
            <term>n</term>
        
            <listitem>
          
               <para>integer. The order of the Fitzpatrick function to compute.
          </para>
        
            </listitem>
      
         </varlistentry>
      
         <varlistentry>
        
            <term>x</term>
        
            <listitem>
          
               <para>column vector. The x values of the grid on which the Fitzpatrick function is evaluated.
          </para>
        
            </listitem>
      
         </varlistentry>
      
         <varlistentry>
        
            <term>xstar</term>
        
            <listitem>
          
               <para>column vector. The x* values of the grid on which the Fitzpatrick function is evaluated.
          </para>
        
            </listitem>
      
         </varlistentry>
    
      </variablelist>
  
   </refsection>

  
   <refsection><title>Description</title>
      
         <para>
        Warning: This function is provided only for comparison and unit testing.  Faster results are achieved by using <link linkend="op_fitz">op_fitz</link>.
      </para>
      
         <para>
        Evaluates the Fitzpatrick function with order n of an operator A on a grid (x,x*).
      </para>
      
         <para>
        This function uses the recursive algorithm given by following formula.  It first precomputes F with n-1 for all (a,xstar) pairs, then computes the maximum across all (a,astar) in A for each (x,xstar) pair.  The function F for n=1 is defined to be x*xstar'.  T(n,N), the time required to compute F(A,n,x,xstar), is O(n*m^2*Nxstar + m*N).  If m==Nx==Nxstar, then T(n,N) = O(m^4).
<!--<programlisting><![CDATA[
    F(A, n, x, xstar) =      sup        [ F(A, n-1, a, xstar) + x*astar - a*astar ]
                        (a,astar) in A

    m = size(A, 2);
    Nx = size(x, 1);
    Nxstar = size(xstar, 1);
    N = Nx * Nxstar;
]]></programlisting>-->
			<para>
				<inlinemediaobject>
					<imageobject>
						<imagedata fileref="op_ImagesOfEquationsByLatex/op_fitz_direct/op_fitz_direct_1.png"/>
					</imageobject>
				</inlinemediaobject>
			</para>
      
         </para>
    
   </refsection>

  
   <refsection><title>Examples</title><programlisting role="example"><![CDATA[
a = 1:4;
astar = 2*a^2 - 9;
x = 0:5;
xstar = -1:5;
F1 = op_fitz_direct([a; astar], 1, x, xstar);
F2 = op_fitz_direct([a; astar], 2, x, xstar);
F3 = op_fitz_direct([a; astar], 3, x, xstar);

clf(); alpha=60; theta=-60;
subplot(131); plot3d(x, xstar, F1, alpha=alpha, theta=theta);
subplot(132); plot3d(x, xstar, F2, alpha=alpha, theta=theta);
subplot(133); plot3d(x, xstar, F3, alpha=alpha, theta=theta);
  ]]></programlisting></refsection>

  
   <refsection><title>See Also</title><simplelist type="inline">
    
      <member>
         <link linkend="op_fitz_brute">op_fitz_brute</link>
      </member>
    
      <member>
         <link linkend="op_fitz">op_fitz</link>
      </member>
    
      <member>
         <link linkend="op_fitzinf">op_fitzinf</link>
      </member>
    
      <member>
         <link linkend="plq_fitzinf0">plq_fitzinf0</link>
      </member>
    
      <member>
         <link linkend="plq_fitzinf0_direct">plq_fitzinf0_direct</link>
      </member>
    
      <member>
         <link linkend="plq_rock">plq_rock</link>
      </member>
  
   </simplelist></refsection>

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

</refentry>