コード例 #1
0
 public Dendrogram()
 {
     _nodes         = new List <DendrogramNode>();
     _nodeMap       = new Dictionary <int, DendrogramNode>();
     _head          = null;
     _clusterNumber = 0;
 }
コード例 #2
0
 public DendrogramNode(int id, RGBColor color, DendrogramNode leftChild, DendrogramNode rightChild, int level)
 {
     Id         = id;
     Color      = color;
     LeftChild  = leftChild;
     RightChild = rightChild;
     Level      = level;
 }
コード例 #3
0
        public void AddNode(Cluster recepientCluster, Cluster donorCluster)
        {
            var node = new DendrogramNode(recepientCluster.Id, recepientCluster.Color, _nodeMap[recepientCluster.Id], _nodeMap[donorCluster.Id], _clusterNumber);

            _clusterNumber--;
            _nodes.Add(node);
            _nodeMap[recepientCluster.Id] = node;
            _head = node;
        }
コード例 #4
0
        public void AddNode(Cluster cluster)
        {
            var node = new DendrogramNode(cluster.Id, cluster.Color, (ResearchObject)cluster.Objects[0].Clone());

            _nodes.Add(node);
            _nodeMap.Add(cluster.Id, node);
            _head = node;
            _clusterNumber++;
        }