public override IHierarchy Generate() { GroupHierarchy result = new GroupHierarchy() { Rank = this.Rank + 1 }; foreach (var SubCluster in Clusters) { Cluster similar = SubCluster.GetMostSimilar(GetNeighbours(SubCluster)).First(); if (similar != null) { result.AddCluster(Cluster.Combine(SubCluster, similar)); } } return(result); }
public override IHierarchy Generate() { GroupHierarchy result = new GroupHierarchy() { Rank = this.Rank + 1 }; foreach (var SubCluster in Clusters) { Cluster similar = SubCluster.GetMostSimilar(GetNeighbours(SubCluster)).First(); if (similar != null) { result.AddCluster(Cluster.Combine(SubCluster, similar)); } float progress = System.Convert.ToSingle((Clusters.IndexOf(SubCluster) + 1) / (double)Clusters.Count); Debug.WriteLine($"{progress}"); } return(result); }