graph.bfs()
was renamed to bfs()
to create a more
consistent API.
graph.bfs(
graph,
root,
mode = c("out", "in", "all", "total"),
unreachable = TRUE,
restricted = NULL,
order = TRUE,
rank = FALSE,
father = FALSE,
pred = FALSE,
succ = FALSE,
dist = FALSE,
callback = NULL,
extra = NULL,
rho = parent.frame(),
neimode
)
The input graph.
Numeric vector, usually of length one. The root vertex, or root vertices to start the search from.
For directed graphs specifies the type of edges to follow. ‘out’ follows outgoing, ‘in’ incoming edges. ‘all’ ignores edge directions completely. ‘total’ is a synonym for ‘all’. This argument is ignored for undirected graphs.
Logical scalar, whether the search should visit the
vertices that are unreachable from the given root vertex (or vertices). If
TRUE
, then additional searches are performed until all vertices are
visited.
NULL
(=no restriction), or a vector of vertices
(ids or symbolic names). In the latter case, the search is restricted to the
given vertices.
Logical scalar, whether to return the ordering of the vertices.
Logical scalar, whether to return the rank of the vertices.
Logical scalar, whether to return the father of the vertices.
Logical scalar, whether to return the predecessors of the vertices.
Logical scalar, whether to return the successors of the vertices.
Logical scalar, whether to return the distance from the root of the search tree.
If not NULL
, then it must be callback function. This
is called whenever a vertex is visited. See details below.
Additional argument to supply to the callback function.
The environment in which the callback function is evaluated.
This argument is deprecated
from igraph 1.3.0; use
mode
instead.