Package dev.nm.graph.algorithm.traversal
Interface GraphTraversal<V>
-
- Type Parameters:
V
- vertex type
- All Known Implementing Classes:
BFS
,BottomUp
,DFS
,TraversalFromRoots
public interface GraphTraversal<V>
A spanning tree T of a connected, undirected graph G is a tree composed of all the vertices and some (or perhaps all) of the edges of G. Informally, a spanning tree of G is a selection of edges of G that form a tree spanning every vertex. That is, every vertex lies in the tree, but no cycles (or loops) are formed.- See Also:
- Wikipedia: Spanning tree
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
GraphTraversal.Node<V>
This is a node in a spanning tree.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<? extends GraphTraversal.Node<V>>
getOrderedNodes()
Gets the list of visited nodes, in the order of being visited.
-
-
-
Method Detail
-
getOrderedNodes
List<? extends GraphTraversal.Node<V>> getOrderedNodes()
Gets the list of visited nodes, in the order of being visited.- Returns:
- the list of visited nodes
-
-