Skip to content

Instantly share code, notes, and snippets.

@lgylym
Last active August 29, 2015 14:06
Show Gist options
  • Save lgylym/ccc12be50ed1be920ab3 to your computer and use it in GitHub Desktop.
Save lgylym/ccc12be50ed1be920ab3 to your computer and use it in GitHub Desktop.
mapreduce template for algorithm2e
\begin{algorithm2e}[htbp]
\SetKwFor{ForEach}{for each}{do}{endfch}%separate foreach with a space
\SetArgSty{textrm} %do not automatically use italic in arguments
\SetKwFunction{Map}{Map}
\SetKwFunction{Reduce}{Reduce}
\SetKwProg{myproc}{Procedure}{}{}
\DontPrintSemicolon % Some LaTeX compilers require you to use \dontprintsemicolon instead
\KwIn{}
\KwOut{}
\myproc{\Map{[(key, value)]}}{
emit(key, value)\;
}
\myproc{\Reduce{(key, [value])}} {
save to file\;
}
\caption{\mr}
\label{algo:mr}
\end{algorithm2e}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment