伪代码
用IEEE的模板写论文时在算法流程图这卡住了,和一般的algorithm不同,需要\begin{figure} , 这里贴几个可用的模板
\usepackage{algorithmic}
\makeatletter
\newcommand{\removelatexerror}{\let\@latex@error\@gobble}
\makeatother
\begin{figure}[!t]
\label{alg:LSB}
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
\removelatexerror
\begin{algorithm}[H]
\caption{Local Search Based Algorithm}
\begin{algorithmic}[1]
\REQUIRE Candidate set $\mathbb{S}$, Initial set $\mathbb{X} = \varnothing$ %%input
\ENSURE Optimum set $\mathbb{X}$ %%output
\STATE {set $r(t)=x(t)$}
\end{algorithmic}
\end{algorithm}
\end{figure}
\begin{figure}[!