Thesis template: use algorithmicx package for algorithms

This commit is contained in:
Gergely Meszaros 2021-07-04 22:26:20 +02:00
parent 1613b0afd7
commit 4d5e90ee39
2 changed files with 17 additions and 19 deletions

View File

@ -95,21 +95,21 @@ Példa forrása: \href{https://www.inf.u-szeged.hu/actacybernetica/}{Acta Cybern
\label{alg:ibb} \label{alg:ibb}
\textbf{\underline{Funct}} IBB($S,f$) \textbf{\underline{Funct}} IBB($S,f$)
\begin{algorithmic}[1] % sorszámok megjelenítése minden n. sor előtt, most n = 1 \begin{algorithmic}[1] % sorszámok megjelenítése minden n. sor előtt, most n = 1
\STATE Set the working list ${\cal L}_W$ := $\{S\}$ and the final list ${\cal L}_Q$ := $\{\}$ \State Set the working list ${\cal L}_W$ := $\{S\}$ and the final list ${\cal L}_Q$ := $\{\}$
\WHILE{( ${\cal L}_W \neq \emptyset$ )} \label{alg:igoend} \While{( ${\cal L}_W \neq \emptyset$ )} \label{alg:igoend}
\STATE Select an interval $X$ from ${\cal L}_W$ \label{step:selrule}\COMMENT{Selection rule} \State Select an interval $X$ from ${\cal L}_W$ \label{step:selrule}\Comment{Selection rule}
\STATE Compute $lbf(X)$ \COMMENT{Bounding rule} \State Compute $lbf(X)$ \Comment{Bounding rule}
\IF[Elimination rule]{$X$ cannot be eliminated} \If{$X$ cannot be eliminated} \Comment{Elimination rule}
\STATE Divide $X$ into $X^j,\ j=1,\dots, p$, subintervals \COMMENT{Division rule} \State Divide $X$ into $X^j,\ j=1,\dots, p$, subintervals \Comment{Division rule}
\FOR{$j=1,\ldots,p$} \For{$j=1,\ldots,p$}
\IF[Termination rule]{$X^j$ satisfies the termination criterion} \If{$X^j$ satisfies the termination criterion} \Comment{Termination rule}
\STATE Store $X^j$ in ${\cal L}_W$ \State Store $X^j$ in ${\cal L}_W$
\ELSE \Else
\STATE Store $X^j$ in ${\cal L}_W$ \State Store $X^j$ in ${\cal L}_W$
\ENDIF \EndIf
\ENDFOR \EndFor
\ENDIF \EndIf
\ENDWHILE \EndWhile
\STATE \textbf{return} ${\cal L}_Q$ \State \textbf{return} ${\cal L}_Q$
\end{algorithmic} \end{algorithmic}
\end{algorithm} \end{algorithm}

View File

@ -411,7 +411,7 @@
% ------------------------------ % ------------------------------
% Algoritmusok és kódblokkok írása % Algoritmusok és kódblokkok írása
\RequirePackage{algorithm} \RequirePackage{algorithm}
\RequirePackage{algorithmic} \RequirePackage{algpseudocode}
\RequirePackage{listingsutf8} \RequirePackage{listingsutf8}
\lstset{ \lstset{
basicstyle=\footnotesize\ttfamily, basicstyle=\footnotesize\ttfamily,
@ -438,8 +438,6 @@
\renewcommand{\lstlistingname}{\codelabel} \renewcommand{\lstlistingname}{\codelabel}
% Forráskódjegyzék elnevezése % Forráskódjegyzék elnevezése
\renewcommand{\lstlistlistingname}{\lstcodelabel} \renewcommand{\lstlistlistingname}{\lstcodelabel}
% Algoritmus kommentek jobb szélre igazítása
\renewcommand{\algorithmiccomment}[1]{\hfill {\it #1}}
% Algoritmus elnevezése % Algoritmus elnevezése
\renewcommand{\ALG@name}{\alglabel} \renewcommand{\ALG@name}{\alglabel}
% ------------------------------ % ------------------------------