Example #1
0
        public ClusteringTreeModel(List <string> dataSet, List <string> parsedRegions, List <string> fileTextes, List <string> files)
        {
            int leafIndex = 0;

            nodeCollection = new ClusterNodeCollection();
            leafCollection = new ClusterLeafCollection();

            var hash = new HashSet <string>();

            foreach (string item in dataSet)
            {
                if (hash.Contains(item))
                {
                    leafIndex++;
                    continue;
                }
                hash.Add(item);

                var leaf = new ClusterLeaf
                {
                    Id       = leafIndex,
                    FileName = files[leafIndex],
                    FileText = fileTextes[leafIndex],
                    Region   = parsedRegions[leafIndex],
                    Value    = dataSet[leafIndex]
                };
                leafCollection.Add(leaf);
                leafIndex++;
            }
        }
Example #2
0
 public void Add(ClusterLeaf leaf)
 {
     leafs.Add(leaf);
 }
Example #3
0
 public void Add(ClusterLeaf leaf)
 {
     leafCollection.Add(leaf);
 }