V
- vertex typepublic static class GraphTraversal.Node<V> extends Object implements Comparable<GraphTraversal.Node<V>>
Modifier | Constructor and Description |
---|---|
protected |
Node(V vertex)
Constructs a node for a spanning tree.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(GraphTraversal.Node<V> n) |
V |
parent()
Gets the parent of the node.
|
protected void |
setParent(V parent)
Sets the parent of the node.
|
protected void |
setVisitTime(int time) |
String |
toString() |
V |
vertex()
Gets the node.
|
int |
visitTime()
Gets the first visit time of this node.
|
protected Node(V vertex)
vertex
- the nodeprotected void setParent(V parent)
parent
- the parent of the nodepublic V parent()
public V vertex()
protected void setVisitTime(int time)
public int visitTime()
public int compareTo(GraphTraversal.Node<V> n)
compareTo
in interface Comparable<GraphTraversal.Node<V>>
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.