Implementation of a matrix rows' summation and a sketch vector subtraction
Rowsums_cpp(P, SK)
is a matrix
is a data sketch
a vector of length \(2m\)
The sums over the rows of the matrix \(P \in R^{2m \time n}\) is a sketch of the decomposition, i.e. \(SK(D\cdot A)\). It is defined as \(P = [cos(W\cdot D \cdot A);sin(W\cdot D \cdot A)]\), where \(W\) is a frequency matrix, \(D\) is a dictionary and \(A\) is a code matrix. This function computes a vector of the difference between a data sketch and the decomposition sketch: \(SK - SK(D\cdot A)\).