知乎:Latex-算法伪代码
IEEE的Latex模板中伪代码和画图
论文参考
伪代码
\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}[!t]
\label{
alg:LSB}
\renewcommand{
\algorithmicrequire}{
\textbf{


5万+

被折叠的 条评论
为什么被折叠?



