K-Means clustering algorithm C# implementation