using System.Collections.Generic;
public static void Main()
var totalIterations = 10000;
var cluster1 = new List<decimal>();
var clusterCenter1 = -10m;
var cluster2 = new List<decimal>();
var clusterCenter2 = 10m;
for (var iteration = 0; iteration < totalIterations; iteration++)
var c1 = Rho(clusterCenter1, i);
var c2 = Rho(clusterCenter2, i);
if (c1 < c2) cluster1.Add(i);
clusterCenter1 = GetNewCenter(clusterCenter1, cluster1);
clusterCenter2 = GetNewCenter(clusterCenter2, cluster2);
public static decimal[] GetElements()
throw new NotImplementedException();
public static decimal Rho(decimal clusterCenter, decimal i)
throw new NotImplementedException();
public static decimal GetNewCenter(decimal oldCenter, List<decimal> cluster)
throw new NotImplementedException();