Scilab Function
Last update : 17/07/2008

op_fitz_direct - [For comparison only] Evaluate the Fitzpatrick function of a given operator on a grid.

Calling Sequence

F = op_fitz_direct(A, n, x, xstar)

Parameters

Description

Warning: This function is provided only for comparison and unit testing. Faster results are achieved by using op_fitz.

Evaluates the Fitzpatrick function with order n of an operator A on a grid (x,x*).

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).

    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;

Examples

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);
  

See Also

op_fitz_brute,  op_fitz,  op_fitzinf,  plq_fitzinf0,  plq_fitzinf0_direct,  plq_rock,  

Author

Bryan Gardiner, University of British Columbia, BC, Canada