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

Method getEdge

src/figtree/treeviewer/ReRootedTree.java:384–392  ·  view source on GitHub ↗

Returns the Edge that connects these two nodes @param node1 @param node2 @return the edge object. @throws jebl.evolution.graphs.Graph.NoEdgeException if the nodes are not directly connected by an edge.

(Node node1, Node node2)

Source from the content-addressed store, hash-verified

382 * if the nodes are not directly connected by an edge.
383 */
384 public Edge getEdge(Node node1, Node node2) throws NoEdgeException {
385 if (((ReRootedNode)node1).getParent() == node2) {
386 return ((ReRootedNode)node1).getEdge();
387 } else if (((ReRootedNode)node2).getParent() == node1) {
388 return ((ReRootedNode)node2).getEdge();
389 } else {
390 throw new NoEdgeException();
391 }
392 }
393
394 /**
395 * @param node1

Callers 5

getParentEdgeMethod · 0.45
getEdgesMethod · 0.45
getNodesMethod · 0.45
getExternalEdgesMethod · 0.45
getInternalEdgesMethod · 0.45

Calls 1

getParentMethod · 0.45

Tested by

no test coverage detected