% -*- root: main.tex -*- \section{Algorithms} \label{sec:algorithms} \subsection{Algorithm for $\gIJ$} \begin{algorithmic} \ForAll{$\wVec \in \pw$} \If{$\sketchHashParam{\wVec} = \buck$} %\If{$\sketchPolarParam{\wVec} = 1$} \State $\polSum += \sketchPolarParam{\wVec}$%+= 1$ %\Else % \State $\gIJ -= 1$ %\EndIf \EndIf \EndFor. \end{algorithmic} %Non-general algorithm %\begin{algorithmic} %\If {$\matrixH' \cdot \wVec = j^{(0)}$ is consistent} % \If {$\matrixH' \cdot \wVec = j^{(1)}$ is consistent} % \State $\gIJ = 0$ % \Else % \State $\gIJ = 2^{\numTup - computeRank(\matrixH')}$ % \EndIf %\ElsIf{$\matrixH' \cdot \wVec = \buck^{(1)}$ is consistent} % \State $\gIJ = 2^{\numTup - computeRank(\matrixH')}$ %\Else % \State $\gIJ = 0$ %\EndIf. %\end{algorithmic} \subsection{Algorithm for Initialization} \begin{algorithmic} \ForAll{$\wVec \in \pw \st \kMapParam{\wVec} = 1$} \State $\sketchJParam{\sketchHashParam{\wVec}} = \sketchPolarParam{\wVec}$ \EndFor. \end{algorithmic} %Non-generic Algorithm %\begin{algorithmic} %\ForAll{$\wVec \st \kMapParam{\wVec} = 1$} % \State $\buck = \matrixH' \cdot \wVec$ % \If{$\buck(\lenB) = 0$} % \State $\sketchIj += 1$ % \Else % \State$\sketchIj -= 1$ % \EndIf %\EndFor. %\end{algorithmic}