Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- usepackage[linesnumbered,ruled,vlined]{algorithm2e}
- renewcommand{labelenumi}{(Roman{enumi})}
- begin{algorithm}
- DontPrintSemicolon % Some LaTeX compilers require you to use dontprintsemicolon instead
- KwIn{a,b,c,d}
- KwOut{e,r}
- Calculate $x$, and $y$ Check,
- renewcommand{labelenumi}{(Roman{enumi})}
- begin{enumerate}[noitemsep,nolistsep]
- item If $k geq n$, then the $m_{2}$.
- item If $h geq j$, then $m_{1}$.
- end{enumerate}
- Otherwise, Initialisation: textit{$g(0)=nj$} $i=0$ Compute $n_{2}$,
- [
- n(i)=frac {a}{b(i)sqrt{3v}}
- ] Update $b$,
- [
- b(i+1)=( -frac{1}{2(g(i)/D}+1)
- ] $i=i+1$, Repeat textit{Steps 3 to 6}, till $|a(i+1)-a(i) |<epsilon$
- caption{algo of g}
- label{algo:b}
- end{algorithm}
- documentclass{article}
- usepackage[linesnumbered,ruled,vlined]{algorithm2e}
- begin{document}
- begin{algorithm}
- %DontPrintSemicolon % Some LaTeX compilers require you to use dontprintsemicolon instead
- KwIn{a,b,c,d}
- KwOut{e,r}
- Calculate $x$, and $y$ Check, linebreak
- %renewcommand{labelenumi}{(Roman{enumi})}
- %begin{enumerate}[noitemsep,nolistsep]
- %item
- (I) If $k geq n$, then the $m_{2}$.
- linebreak
- %item
- (II) If $h geq j$, then $m_{1}$. %end{enumerate}
- Otherwise, Initialisation: textit{$g(0)=nj$} $i=0$ Compute $n_{2}$,
- [
- n(i)=frac {a}{b(i)sqrt{3v}}
- ] Update $b$,
- [
- b(i+1)=( -frac{1}{2(g(i)/D}+1)
- ] $i=i+1$, Repeat textit{Steps 3 to 6}, till $|a(i+1)-a(i) |<epsilon$
- caption{algo of g}
- label{algo:b}
- end{algorithm}
- end{document}
- documentclass{article}
- usepackage[linesnumbered,ruled,vlined]{algorithm2e}% http://ctan.org/pkg/algorithm2e
- DontPrintSemicolon
- begin{document}
- begin{algorithm}
- KwIn{$a$, $b$, $c$, $d$}
- KwOut{$e$, $r$}
- Calculate~$x$ and~$y$;
- lIf{$k geq n$}{$m_2$};
- lIf{$h geq j$}{$m_1$};
- Else{%
- Repeat{$|a(i+1)-a(i)| < epsilon$}{%
- Initialisation: $g(0) = nj$;label{stepA}
- $i=0$;
- Compute~$n_2$
- [
- n(i) = frac{a}{b(i)sqrt{3v}}
- ]
- nl Update~$b$
- [
- b(i+1) = (-frac{1}{2(g(i)/D} + 1)
- ]
- nl $i = i + 1$;
- }
- }
- caption{My algorithm}
- label{algo:b}
- end{algorithm}
- end{document}
- {
- begin{enumerate}[noitemsep,nolistsep]
- item If $k geq n$, then the $m_{2}$.
- item If $h geq j$, then $m_{1}$.
- end{enumerate}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement