\begfile{CS445AlgForm.tex of December 7, 1982 11:24 PM}
% repository of algorithm formats


\sect{99.2 Same in new notation.}
% New algorithm format.

\def\stdparindent{ 0pt }

\def\algorithm#1#2#3{\penalty-300\vskip 5pt plus 3pt minus 3pt
\hangindent 20pt {\bf Algorithm #1. }{\it #2}
\varunit 15pt
#3 \hskip 3pt\blackslug\parindent\stdparindent \par\vskip 5pt plus 3pt minus 3pt}
\def\step#1#2{\par\parindent -5pt\hangindent #1vu after0 #2}
\def\sno#1{{\bf #1.}} % step number.
\def\nono{\hbox to 5pt{\null}} % for unnumbered steps.
\def\sna#1{[{\it #1}]} % step name and comments.

\sect{99.3 A Slight variant of 99.2: continuation lines flush with first.}
% New algorithm format.

\def\stdparindent{ 0pt }

\def\algorithm#1#2#3{\penalty-300\vskip 5pt plus 3pt minus 3pt
\hangindent 20pt {\bf Algorithm #1. }{\it #2}
\varunit 15pt
#3 \hskip 3pt\blackslug\parindent\stdparindent \par\vskip 5pt plus 3pt minus 3pt}
\def\step#1#2{\par\parindent 0pt\hangindent #1vu after0 #2}
\def\sno#1{{\bf #1.}} % step number.
\def\nono{} % for unnumbered steps.
\def\sna#1{[{\it #1}]} % step name and comments.

\sect{99.5 Same as 99.3, with somewhat different indentation parameters.}
% Algorithm format.

\def\stdparindent{ 0pt }

\def\algorithm#1#2#3{\penalty-300\vskip 5pt plus 3pt minus 3pt
\hangindent 20pt {\bf Algorithm #1. }{\it #2}
\varunit 20pt
#3 \hskip 3pt\blackslug\parindent\stdparindent \par\vskip 5pt plus 3pt minus 3pt}
\def\step#1#2{\par\parindent 0pt\hangindent #1vu after0 #2}
\def\sno#1{{\bf #1.}} % step number.
\def\nono{} % for unnumbered steps.
\def\sna#1{[{\it #1}]} % step name and comments.

\sect{99.4 Grouping rules, continuation lines flush.}
% Algorithm format.

\def\stdparindent{0} % in points
\def\algwidth{395} % in points - max: page width - \contindent
\def\stepindent{15} % in points - extra indent. per level
\def\contindent{0} % in points - extra indent. of cont. lines

\def\algorithm#1#2#3{{\penalty-300\vskip 8pt plus 3pt minus 3pt
\hangindent 20pt {\bf Algorithm #1. }{\it #2}\par
\vskip 7pt plus 2pt minus0pt\penalty 1000
\parindent 0pt \hangindent 0pt after0
\baselineskip0pt \lineskip0pt
#3
\parindent\stdparindent pt
\par\vskip 5pt plus 3pt minus 3pt}}

\def\vbars{\ifpos4
{\hskip12pt plus0pt minus0pt
\vrule width1pt
\hskip 2pt plus0pt minus0pt
\advcount3 by -\stepindent
\advcount4 by -1
\vbars}
\else
{}}

\def\afig#1{
\ftpar\vbox to #1cm{\null}\ftpar
} % figure in algorithm steps

\def\step#1#2{\par
\setcount3 \algwidth
\setcount4 #1
\hbox to size
{\vbars
\hskip \contindent pt
\vbox{
\vskip 3pt plus0pt minus0pt
{\baselineskip 12pt \lineskip 1pt
\hbox par \count3pt{\hskip-\contindent pt #2}}
\vskip 2pt plus0pt minus0pt}
\hfil}}

\def\sno#1{{\bf #1.}} % step number.
\def\nono{\hskip \contindent pt } % for unnumbered steps.
\def\sna#1{$[${\it #1}$]$} % step name and comments.
\def\blackslug{
\hbox{\hskip1pt\vrule width4pt height6ptdepth1pt \hskip1pt}}
\def\blug{\hskip 3pt\blackslug}

\sect{99.6 Grouping brackets, continuation lines flush.}
% Algorithm format.

\def\stdparindent{0} % in points
\def\algwidth{395} % in points - max: page width - \contindent
\def\stepindent{15} % in points - extra indent. per level
\def\contindent{0} % in points - extra indent. of cont. lines

\def\algorithm#1#2#3{{\penalty-300\vskip 10pt plus 3pt minus 3pt
\hangindent 20pt {\bf Algorithm #1. }{\it #2}\par
\vskip 7pt plus 2pt minus0pt\penalty 1000
\parindent 0pt \hangindent 0pt after0
\baselineskip 0pt \lineskip0pt
#3
\parindent\stdparindent pt
\par\vskip 10pt plus 3pt minus 3pt}}

\def\vbars{\ifpos4
{\hskip12pt plus0pt minus0pt
\vrule width1pt
\hskip 2pt plus0pt minus0pt
\advcount3 by -\stepindent
\advcount4 by -1
\vbars}
\else
{}}

\def\afig#1{
\ftpar\vbox to #1cm{\null}\ftpar
} % figure in algorithm steps

\def\step#1#2{\par\vskip-1pt plus 0pt minus0pt
\setcount3 \algwidth
\setcount4 #1
\hbox to size
{\vbars
\hskip \contindent pt
\vbox{
\vskip 3pt plus0pt minus0pt
{\baselineskip12pt \lineskip1pt
\hbox par \count3pt{\hskip-\contindent pt #2}}
\vskip 2pt plus0pt minus0pt}
\hfil}}

\def\ear#1{\par
\setcount3 \algwidth
\setcount4 #1
\hbox to size
{\vbars
\hskip12pt plus0pt minus0pt
\vrule height1pt width3pt
\hfil}}

\def\sno#1{{\bf #1.}} % step number.
\def\nono{\hskip \contindent pt } % for unnumbered steps.
\def\sna#1{$[${\it #1}$]$} % step name and comments.
\def\blug{\hskip 3pt\blackslug}