public Dendrogram() { _nodes = new List <DendrogramNode>(); _nodeMap = new Dictionary <int, DendrogramNode>(); _head = null; _clusterNumber = 0; }
public DendrogramNode(int id, RGBColor color, DendrogramNode leftChild, DendrogramNode rightChild, int level) { Id = id; Color = color; LeftChild = leftChild; RightChild = rightChild; Level = level; }
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; }
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++; }