ok yes. there were some issues with tabs and spaces. I made it uniform.
Also, is there any way I can run unit test for kmeans only and see if its working as expected? Maybe using ctest or something?