MCPcopy Create free account
hub / github.com/rambaut/figtree / createInternalNode

Method createInternalNode

src/figtree/treeviewer/ReRootedTree.java:152–163  ·  view source on GitHub ↗

Once a SimpleRootedTree has been created, the node stucture can be created by calling createExternalNode and createInternalNode. First of all createExternalNode is called giving Taxon objects for the external nodes. Then these are put into sets and passed to createInternalNode to create a parent of

(Node source, List<? extends Node> children)

Source from the content-addressed store, hash-verified

150 * @return the created node reference
151 */
152 private ReRootedNode createInternalNode(Node source, List<? extends Node> children) {
153 ReRootedNode node = new ReRootedNode(source, children);
154
155 for (Node child : children) {
156 ((ReRootedNode)child).setParent(node);
157 }
158
159 internalNodes.add(node);
160
161 rootNode = node;
162 return node;
163 }
164
165 public Node getSourceNode(Node node) {
166 return ((ReRootedNode)node).source;

Callers 3

ReRootedTreeMethod · 0.95
createNodesMethod · 0.95
getSelectedSubtreeMethod · 0.80

Calls 2

setParentMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected