Advertisement
Guest User

Untitled

a guest
Mar 21st, 2017
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 0.88 KB | None | 0 0
  1. \documentclass{article}
  2.  
  3. \usepackage{algorithm2e,enumerate,mathtools}
  4. \SetKwFor{KWHILE}{for}{do}{endfor}
  5. \DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
  6.  
  7. \begin{document}
  8.  
  9. \begin{algorithm}[H]
  10.  \caption{Algorithm caption}
  11.  \KWHILE{stop condition}{
  12.    \begin{enumerate}[(a)]
  13.      \item sparse coding: problem
  14.        \[
  15.          \min_{\mathbf{x}_i} \norm[\Big]{ \mathbf{y}_i - \mathbf{D}^{(J-1)} \mathbf{x}_i}_2^2
  16.          \quad \text{s.t.} \quad
  17.          \norm{ \mathbf{x}_i }_0 \leq s
  18.        \]
  19.      \item dictionary update: \ldots
  20.  
  21.        \makebox[\linewidth]{$\displaystyle
  22.          \min_{\mathbf{x}_i} \norm[\Big]{ \mathbf{y}_i - \mathbf{D}^{(J-1)} \mathbf{x}_i}_2^2
  23.          \quad \text{s.t.} \quad
  24.          \norm{ \mathbf{x}_i }_0 \leq s
  25.        $}
  26.        
  27.      \item dictionary update: \ldots
  28.    \end{enumerate}}
  29. \end{algorithm}
  30.  
  31. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement