User:Illuvetar/sandbox

$$\mathbf{W_{m,j}}=\begin{bmatrix} \sum\limits_{k=1}^n\begin{cases} \mathbf{C}_{(2k-1),2} & \text{ if } \mathbf{C}_{(2k-1),1}=1\\ 0 & \text{ if } \mathbf{C}_{(2k-1),1}\neq 1\\ \end{cases} & \sum\limits_{k=1}^n\begin{cases} \mathbf{C}_{(2k-1),3} & \text{ if } \mathbf{C}_{(2k-1),1}=1\\ 0 & \text{ if } \mathbf{C}_{(2k-1),1}\neq 1\\ \end{cases}\\

\vdots & \vdots \\

\sum\limits_{k=1}^n\begin{cases} \mathbf{C}_{(2k-1),2} & \text{ if } \mathbf{C}_{(2k-1),1}=16\\ 0 & \text{ if } \mathbf{C}_{(2k-1),1}\neq 16\\ \end{cases} & \sum\limits_{k=1}^n\begin{cases} \mathbf{C}_{(2k-1),3} & \text{ if } \mathbf{C}_{(2k-1),1}=16\\ 0 & \text{ if } \mathbf{C}_{(2k-1),1}\neq 16\\ \end{cases} \end{bmatrix} $$

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
$$\mathbf{B_{m,j}}=\begin{bmatrix} \sum\limits_{k=1}^n\begin{cases} \mathbf{C}_{(2k),2} & \text{ if } \mathbf{C}_{(2k),1}=1\\ 0 & \text{ if } \mathbf{C}_{(2k),1}\neq 1\\ \end{cases} & \sum\limits_{k=1}^n\begin{cases} \mathbf{C}_{(2k),3} & \text{ if } \mathbf{C}_{(2k),1}=1\\ 0 & \text{ if } \mathbf{C}_{(2k),1}\neq 1\\ \end{cases}\\

\vdots & \vdots \\

\sum\limits_{k=1}^n\begin{cases} \mathbf{C}_{(2k),2} & \text{ if } \mathbf{C}_{(2k),1}=16\\ 0 & \text{ if } \mathbf{C}_{(2k),1}\neq 16\\ \end{cases} & \sum\limits_{k=1}^n\begin{cases} \mathbf{C}_{(2k),3} & \text{ if } \mathbf{C}_{(2k),1}=16\\ 0 & \text{ if } \mathbf{C}_{(2k),1}\neq 16\\ \end{cases} \end{bmatrix} $$

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
$$\mathbf{C_{m,j}}=\begin{bmatrix} \textit{Chess piece 1..16} & \textit{Horizontal shift} & \textit{Vertical shift}\\

\vdots & \vdots & \vdots\\

\end{bmatrix} $$