\resetsteps      % Reset all the commands to create a blank worksheet  

% Define the operation to be computed

\renewcommand{\operation}{ (b  := x) \wedge (Lx = b) }
\renewcommand{\routinename}{ b \becomes \mbox{\sc trsv\_blk\_var2}(L, b) }
\renewcommand{\routinecost}{ n^2 }

\renewcommand{\blocksize}{ n_b }

% Step 3: Loop-guard 

\renewcommand{\guard}{
  m( b_{T} ) < m( b )
}

% Step 4: Define Initialize 

\renewcommand{\partitionings}{
  $
  L \rightarrow
  \FlaTwoByTwo{L_{TL}}{ 0    }
              {L_{BL}}{L_{BR}}
  $
,
  $
  b \rightarrow
  \FlaTwoByOne{b_{T}}
              {b_{B}}
  $
}

\renewcommand{\partitionsizes}{
$ L_{TL} $ is $ 0 \times 0 $ and
$ b_{T} $ has $ 0 $ elements
}

% Step 5a: Repartition the operands 

\renewcommand{\repartitionings}{
$
  \FlaTwoByTwo{L_{TL}}{ 0    }
              {L_{BL}}{L_{BR}}
  \rightarrow
  \FlaThreeByThreeBR{L_{00}}{ 0    }{ 0    }
                    {L_{10}}{L_{11}}{ 0    }
                    {L_{20}}{L_{21}}{L_{22}}
$,
$
  \FlaTwoByOne{ b_T }
              { b_B }
\rightarrow
  \FlaThreeByOneB{b_0}
                 {b_1}
                 {b_2}
$
}

\renewcommand{\repartitionsizes}{
  $ L_{11} $ is $\blocksize \times \blocksize$ and $ b_1 $ has $\blocksize$
  elements}

% Step 5b: Move the double lines 

\renewcommand{\moveboundaries}{
$
  \FlaTwoByTwo{L_{TL}}{ 0    }
              {L_{BL}}{L_{BR}}
  \leftarrow
  \FlaThreeByThreeTL{L_{00}}{ 0    }{ 0    }
                    {L_{10}}{L_{11}}{ 0         }
                    {L_{20}}{L_{21}}{L_{22}}
$,
$
  \FlaTwoByOne{ b_T }
              { b_B }
\leftarrow
  \FlaThreeByOneT{b_0}
                 {b_1}
                 {b_2}
$
}

\renewcommand{\update}{
$
  \begin{array}{l}
  b_1 \becomes \mbox{\sc trsv}(L_{11},b_1) \\
  b_2 \becomes  b_2 - L_{21} b_1  ~~~~~~(\matvec)
  \end{array}
$
}

% Step 8: Insert the updates required to change the 
%         state from that given in Step 6 to that given in Step 7
% Note: The below needs editing!!!

\renewcommand{\update}{
  $
  \begin{array}{l}
    x_1 \becomes \mbox{\sc trsv}(L_1,b_1) \\
    b_2 \becomes  b_2 - L_{21} x_1 ~~~~~~(\matvec)
  \end{array}
  $
}

\FlaAlgorithm     % this command generates the algorithm

LinearAlgebraWiki: Algorithms/Trsv ln/BlkVar2 (last edited 2007-01-11 18:27:01 by RobertVanDeGeijn)