C++ code for Gaussian Mixture Model