Пример #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);
        }
Пример #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);
        }