I have the following problem: the equation in the algorithm doesn't in the middle of algorithm, how can I forward the equation, the code is as follows:
\begin{algorithm}[H]
\SetKwFor{KWHILE}{for}{do}{endfor}
\caption{algorithm }
\label{algo1} %
\KWHILE{stop condition}{
\begin{enumerate}[(a)]
\item sparse coding:problem$$\underset{{{\mathbf{x}}_{i}}}{\mathop{\min }}\,\left\| {{\mathbf{y}}_{i}}-{{\mathbf{D}}^{\left( J-1 \right)}}{{\mathbf{x}}_{i}} \right\|_{2}^{2}\ \ \ \ s.t.\ \ \ {{\left\| {{\mathbf{x}}_{i}} \right\|}_{0}}\le s$$ \\
\item dictionary update:...
\end{enumerate}}
\end{algorithm}
Can anyone help me with this?
