Package dev.nm.graph.algorithm.traversal
Class BFS.Node<V>
- java.lang.Object
-
- dev.nm.graph.algorithm.traversal.GraphTraversal.Node<V>
-
- dev.nm.graph.algorithm.traversal.BFS.Node<V>
-
- Type Parameters:
V
- vertex type
- All Implemented Interfaces:
Comparable<GraphTraversal.Node<V>>
- Direct Known Subclasses:
DFS.Node
public static class BFS.Node<V> extends GraphTraversal.Node<V>
This is a node in a BFS-spanning tree.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
depth()
Gets the depth of this node.protected void
setParent(BFS.Node<V> parent)
String
toString()
-
Methods inherited from class dev.nm.graph.algorithm.traversal.GraphTraversal.Node
compareTo, parent, setParent, setVisitTime, vertex, visitTime
-
-
-
-
Constructor Detail
-
Node
protected Node(V vertex)
Constructs a node for a spanning tree.- Parameters:
vertex
- the node
-
-