Exemplo n.º 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++;
            }
        }
Exemplo n.º 2
0
 public void Add(ClusterLeaf leaf)
 {
     leafs.Add(leaf);
 }
Exemplo n.º 3
0
 public void Add(ClusterLeaf leaf)
 {
     leafCollection.Add(leaf);
 }