fixed_discrete_covariance: diagonal indices faster