powered by
Function for gradient computation.
G_fun_cpp(x, y, W)
is a vector
is a frequency matrix
A vector