clusterPoints property

List<List<List<double>>> clusterPoints
latefinal

For each cluster, the list of points belonging to that cluster.

clusterPoints[i] gives the list of points belonging to the cluster with mean means[i].

Implementation

late final List<List<List<double>>> clusterPoints = (() {
  final List<List<List<double>>> cp = List<List<List<double>>>.generate(
    means.length,
    (int i) => <List<double>>[],
  );
  for (int i = 0; i < points.length; i++) {
    cp[clusters[i]].add(points[i]);
  }
  return cp;
})();