Last chance! 50% off unlimited learning
Sale ends in
Compute the descendants for each node of a graph
build.descendants(g)build.descendants.per.level(g, levels)
build.descendants.bottom.up(g, levels)
a graph of class graphNEL
. It represents the hierarchy of the classes
a list of character vectors. Each component represents a graph level and the elements of any component correspond to nodes. The level 0 coincides with the root node.
build.descendants
returns a named list of vectors.
Each component corresponds to a node
build.descendants.per.level
returns a named list of vectors.
Each component corresponds to a node
build.descendants.bottom.up
returns a named list of vectors.
Each component corresponds to a node
# NOT RUN {
data(graph);
root <- root.node(g);
desc <- build.descendants(g);
lev <- graph.levels(g, root=root);
desc.tod <- build.descendants.per.level(g,lev);
desc.bup <- build.descendants.bottom.up(g,lev);
# }
Run the code above in your browser using DataLab