Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }