Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. usepackage{algorithm}
  2. usepackage[noend]{algpseudocode}
  3.  
  4. algnewcommand{Inputs}[1]{%
  5. State textbf{Inputs:}
  6. Statex hspace*{algorithmicindent}parbox[t]{.9linewidth}{raggedright #1}
  7. }
  8. algnewcommand{Outputs}[1]{%
  9. State textbf{Outputs:}
  10. Statex hspace*{algorithmicindent}parbox[t]{.9linewidth}{raggedright #1}
  11. }
  12. algnewcommand{Compute}[1]{%
  13. State textbf{Compute:}
  14. hspace*{algorithmicindent}parbox[t]{.9linewidth}{raggedright #1}
  15. }
  16.  
  17. begin{algorithm}
  18. begin{algorithmic}
  19. Inputs{$X$}
  20. Compute{
  21. For{i = 0 to I}
  22. State do sth in the loop
  23. EndFor
  24. }
  25. Outputs{$Y$}
  26. end{algorithmic}
  27. end{algorithm}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement