calc_sigma_cpp function

Calculate the sigma covariance matrix of a Gaussian linear network. This is the C++ backend of the function.