These functions return information on graph traversal by breadth and depth first search using routines from the BOOST library.
instance of class graph from Bioconductor graph class
node name where search starts; defaults to the node in first position in the node vector.
logical for backwards compatibility; this parameter has no effect as of RBGL 1.7.9 and will be removed in future versions.
These two functions are interfaces to the BOOST graph library functions for breadth first and depth first search. Both methods handle unconnected graphs by applying the algorithms over the connected components.
Cormen et al note (p 542) that 'results of depth-first search may depend upon the order in which the vertices are examined ... These different visitation orders tend not to cause problems in practice, as any DFS result can usually be used effectively, with essentially equivalent results'.
bfs a vector of node indices in order of BFS visit.
dfs a list of two vectors of nodes, with elements
(order of DFS discovery), and
finish (order of DFS completion).
VJ Carey <[email protected]>
Boost Graph Library ( www.boost.org/libs/graph/doc/index.html )
The Boost Graph Library: User Guide and Reference Manual; by Jeremy G. Siek, Lie-Quan Lee, and Andrew Lumsdaine; (Addison-Wesley, Pearson Education Inc., 2002), xxiv+321pp. ISBN 0-201-72914-8
1 2 3 4 5 6 7 8 9 10 11 12
Loading required package: graph Loading required package: BiocGenerics Loading required package: parallel Attaching package: 'BiocGenerics' The following objects are masked from 'package:parallel': clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap, parApply, parCapply, parLapply, parLapplyLB, parRapply, parSapply, parSapplyLB The following objects are masked from 'package:stats': IQR, mad, xtabs The following objects are masked from 'package:base': Filter, Find, Map, Position, Reduce, anyDuplicated, append, as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table, tapply, union, unique, unsplit, which, which.max, which.min  "r" "s" "v" "w" "t" "x" "u" "y"  "s" "w" "r" "t" "x" "v" "u" "y" $discovered  "u" "v" "y" "x" "w" "z" $finish  "x" "y" "v" "u" "z" "w"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.