Learn R Programming

SSDL (version 1.1)

Rowsums_cpp: Rowsums_cpp

Description

Implementation of a matrix rows' summation and a sketch vector subtraction

Usage

Rowsums_cpp(P, SK)

Arguments

P

is a matrix

SK

is a data sketch

Value

a vector of length \(2m\)

Details

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)\).

See Also

Gradient_D_cpp_parallel