TeX - LaTeX Asked by user14501873 on April 1, 2021
One part of my algorithm is done in parallel, for that, I have a block in my algorithm, but I can not show it properly. Can anybody help me to solve this problem?
usepackage[linesnumbered,lined,boxed,commentsnumbered,ruled,longend]{algorithm2e}
begin{document}
begin{algorithm}[!t]
DontPrintSemicolon
SetKwBlock{DoParallel}{do in parallel}{end}
begin{algorithmic}[1]
STATE DoParallel{
FOR{ $1leq i leq Epoch$}
STATE Do the
ENDFOR
FOR{ $1leq i leq Epoch$}
STATE Do the 1;
ENDFOR}
end{algorithmic}label{}
end{algorithm}
end{document}
Any other response which is related to the parallel in the algorithm is appreciated.
You are mixing (at least) two different packages for typesetting algorithms. I suggest, you stick to one of them:
documentclass{article}
usepackage[linesnumbered,lined,boxed,commentsnumbered,ruled,longend]{algorithm2e}
begin{document}
begin{algorithm}[!t]
DontPrintSemicolon
SetKwBlock{DoParallel}{do in parallel}{end}
DoParallel{
For{$1leq i leq$ Epoch}{
Do the
}
For{$1leq i leq$ Epoch}{
Do the 1;
}
}
end{algorithm}label{oursmc}
end{document}
Correct answer by DG' on April 1, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP