pad.mattdiesel.co.uk

Snippet - Robotics Coursework - Algorithm Latex

Robotics Coursework - Algorithm Latex (TeX)


Created 2016-12-15 21:19:33.715810 by Matt.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
\begin{algorithm}[H]
\caption{Generating the Cartesian Map}
\label{genmap}

\begin{algorithmic}
\Require{}
\Ensure{A map $\vect{m}(\vect{p})$ with each cell containing a list of valid angle sets}
\Statex
\Function{GenMap}{}
    \ForAll{$\vect{q} \gets \text{ValidAngleCombinations}$}
        \State $\vect{p} \gets \mathrm{endpos}(\vect{q})$
        \State $\vect{m}(p).\mathrm{append}(\vect{q})$
    \EndFor
\EndFunction
\end{algorithmic}
\end{algorithm}