V
- vertex typepublic static class DFS.Node<V> extends BFS.Node<V>
Modifier and Type | Class and Description |
---|---|
static class |
DFS.Node.Color
This is the coloring scheme of visits.
|
Modifier and Type | Field and Description |
---|---|
protected DFS.Node.Color |
color |
protected int |
finishTime |
protected boolean |
isCyclic |
Modifier | Constructor and Description |
---|---|
protected |
Node(V vertex)
Constructs a node for a spanning tree.
|
Modifier and Type | Method and Description |
---|---|
DFS.Node.Color |
color()
Gets the color of this node.
|
int |
finishTime()
Gets the finish time, the time to finish visiting its sub-tree, of this node.
|
boolean |
isCyclic()
Check whether this node is on a cyclic path of the graph.
|
String |
toString() |
compareTo, parent, setParent, setVisitTime, vertex, visitTime
protected DFS.Node.Color color
protected int finishTime
protected boolean isCyclic
protected Node(V vertex)
vertex
- the nodepublic DFS.Node.Color color()
public int finishTime()
public boolean isCyclic()
true
if this node is on a cyclic path of the graphCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.