\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\_var2}(L, b) }
\renewcommand{\routinecost}{ n^2 }


% Step 3: Loop-guard 

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

% Step 4: 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    }
                    {\tr{l}_{10}}{\lambda_{11}}{ 0         }
                    {L_{20}}{l_{21}}{L_{22}}
$,
$
  \FlaTwoByOne{ b_T }
              { b_B }
\rightarrow
  \FlaThreeByOneB{b_0}
                 {\beta_1}
                 {b_2}
$
}

\renewcommand{\repartitionsizes}{
  $ \lambda_{11} $ and $ \beta_1 $ are scalars}

% Step 5b: Move the double lines 

\renewcommand{\moveboundaries}{
$
  \FlaTwoByTwo{L_{TL}}{ 0    }
              {L_{BL}}{L_{BR}}
  \leftarrow
  \FlaThreeByThreeTL{L_{00}}{ 0    }{ 0    }
                    {\tr{l}_{10}}{\lambda_{11}}{ 0         }
                    {L_{20}}{l_{21}}{L_{22}}
$,
$
  \FlaTwoByOne{ b_T }
              { b_B }
\leftarrow
  \FlaThreeByOneT{b_0}
                 {\beta_1}
                 {b_2}
$
}

\renewcommand{\update}{
$
  \begin{array}{l}
  \beta_1 \becomes \beta_1 / \lambda_{11} \\
  b_2 \becomes  b_2 - \beta_1 l_{21}  ~~~~~~~(\saxpy)
  \end{array}
$
}

\FlaAlgorithm     % this command generates the algorithm

LinearAlgebraWiki: Algorithms/Trsv/UnbVar2 (last edited 2007-01-10 13:48:03 by RobertVanDeGeijn)