irls_gaussian_cpp function

Iterative Reweighed Least Square algorithm for Gaussians