Implementation k-means cluster algorithm in C#