Identify descendant edges
Quickly identify edges that are 'descended' from edges in a tree.
DescendantEdges(edge = NULL, parent, child, nEdge = length(parent)) AllDescendantEdges(parent, child, nEdge = length(parent))
edge |
Integer specifying the number of the edge whose child edges are
required (see |
parent |
Integer vector corresponding to the first column of the edge
matrix of a tree of class |
child |
Integer vector corresponding to the second column of the edge
matrix of a tree of class |
nEdge |
number of edges (calculated from |
The order of parameters in DescendantEdges()
will change in the future,
to allow AllDescendantEdges()
to be merged into this function
(#31).
Please explicitly name the edge
parameter in DescendantEdges()
, and
replace AllDesdendantEdges()
with DescendantEdges(edge = NULL)
,
to future-proof your code.
DescendantEdges()
returns a logical vector stating whether each
edge in turn is a descendant of the specified edge (or the edge itself).
AllDescendantEdges()
returns a matrix of class logical, with row
N specifying whether each edge is a descendant of edge N
(or the edge itself).
Other tree navigation:
AncestorEdge()
,
CladeSizes()
,
EdgeAncestry()
,
EdgeDistances()
,
ListAncestors()
,
MRCA()
,
NDescendants()
,
NodeDepth()
,
NodeOrder()
,
NonDuplicateRoot()
,
RootNode()
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.