protected virtual List<ICluster> Cluster(IClusteringStrategy strategy, ObjectListView listView, OLVColumn column)
{
// Build a map that correlates cluster key to clusters
NullableDictionary<object, ICluster> map = new NullableDictionary<object, ICluster>();
int count = 0;
foreach (object model in listView.ObjectsForClustering) {
this.ClusterOneModel(strategy, map, model);
if (count++ > this.MaxObjectsToConsider)
break;
}
// Now that we know exactly how many items are in each cluster, create a label for it
foreach (ICluster cluster in map.Values)
cluster.DisplayLabel = strategy.GetClusterDisplayLabel(cluster);
return new List<ICluster>(map.Values);
}