GraphTheory
Traverse
traverse vertices of a graph
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
Traverse(G, t, opts)
G
-
graph
t
(optional) one of breadthfirst or depthfirst; default is breadthfirst
opts
(optional) one or more options as specified below
connected=truefalse
Specifies whether the traversal should be of a connected component. If true, the vertices visited in the traversal are only those reachable from the starting vertex; vertices in other components are not traversed. If false, all vertices in the graph are visited. The default is false.
output=one of iterator or list.
Specifies whether this command returns a list encoding a traversal or an Iterator which will perform the traversal when repeatedly invoked. The default is list.
startvertex=a valid vertex in G
Specifies the starting vertex for a traversal. If not provided, a vertex is chosen by Traverse.
Traverse(G,t) returns a list or Iterator encoding a particular traversal of the vertices of G.
The GraphTheory[Traverse] command was introduced in Maple 2022.
For more information on Maple 2022 changes, see Updates in Maple 2022.
See Also
AllPairsDistance
MinimalSpanningTree
ShortestPath
SpanningTree
Download Help Document