I have the following code in algorithm2e with boxruled, vlined, and linesnumbered options. pdflatex gives me an empty line at the end of both the for loops inside the ifs. Can someone please suggest a way to get rid of the extra lines? Thanks.
\If {$\lfloor c\ (\log (n+1) - \log n) \rfloor > 1$}
{
$u \leftarrow {\tt SampleControl}$\;
$U \leftarrow \{ u \} \cup U_m$\;
}
${\tt ConnectState}(z, S_{n+1}, U, P_n, Q_n, \delta_n)$\;
\eIf{$\min_{u \in U} \Delta t_{n+1} (z_{n+1}, u) \leq \delta_n$}
{ $\delta_{n+1} = \delta_n/2$\;
\For{$z \in S_{n+1}$}{
${\tt ConnectState}(z, S_{n+1}, U, P_{n+1}, Q_{n+1}, \delta_{n+1})$\;
}}{ $\delta_{n+1} \leftarrow \delta_n$\;
\For{$z' \in Z_\mathrm{near}(z_{n+1})$}{
${\tt ConnectState}(z', S_{n+1}, U, P_{n+1}, Q_{n+1}, \delta_{n+1})$\;
}}
