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

Method getNodes

src/figtree/treeviewer/ReRootedTree.java:425–432  ·  view source on GitHub ↗

Returns an array of 2 nodes which are the nodes at either end of the edge. @param edge @return an array of 2 edges

(Edge edge)

Source from the content-addressed store, hash-verified

423 * @return an array of 2 edges
424 */
425 public Node[] getNodes(Edge edge) {
426 for (Node node : getNodes()) {
427 if (((ReRootedNode)node).getEdge() == edge) {
428 return new Node[] { node, ((ReRootedNode)node).getParent() };
429 }
430 }
431 return null;
432 }
433
434 /**
435 * @return the set of all nodes in this graph.

Callers 15

getEdgesMethod · 0.95
calculateNodeHeightsMethod · 0.95
initializeMethod · 0.80
calculateStepsMethod · 0.80
selectNodesMethod · 0.80
setupBranchDecoratorsMethod · 0.80
selectAllNodesMethod · 0.80
getNodeAtMethod · 0.80
getNodesAtMethod · 0.80
addTreeMethod · 0.80
setTreeMethod · 0.80

Calls 4

getDegreeMethod · 0.80
getEdgeMethod · 0.45
getParentMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected