public void CalcCentroid()
{
// only called by CAInstance
int numDp = _cluster.Size();
var temp = new double[_centers.Length];
// caluclating the new Centroid
for (int i = 0; i < numDp; i++)
{
for (int j = 0; j < temp.Length; j++)
{
temp[j] += _cluster.Get(i)[j];
}
}
for (int i = 0; i < temp.Length; i++)
{
_centers[i] = temp[i]/numDp;
}
_cluster.CalcSumOfSquares();
}
}