public void IterateUntilStable() { int[] counts; do { counts = this.clusters.Select(c => c.PointCount).ToArray(); this.IterateOnce(); } while (DetectCountChange(counts)); }