k-means clustering implementation in c#