DataT
- the type of the data stored in the graph's nodesNodeT
- the type of the nodes in the graphpublic class Graph<DataT,NodeT extends Node<DataT,NodeT>> extends Object
Each node in a graph is represented by Node
Modifier and Type | Field and Description |
---|---|
protected Map<String,NodeT> |
nodeTable
the nodes in the graph.
|
Constructor and Description |
---|
Graph()
Creates a directed graph.
|
Modifier and Type | Method and Description |
---|---|
void |
addNode(NodeT node)
Adds a node to this graph.
|
protected String |
findPath(String start,
String end)
Find the path.
|
Collection<NodeT> |
getNodes() |
void |
visit(com.microsoft.azure.management.resources.fluentcore.dag.Graph.Visitor visitor)
Perform DFS visit in this graph.
|
public Collection<NodeT> getNodes()
public void addNode(NodeT node)
node
- the nodepublic void visit(com.microsoft.azure.management.resources.fluentcore.dag.Graph.Visitor visitor)
The directed graph will be traversed in DFS order and the visitor will be notified as search explores each node and edge.
visitor
- the graph visitorCopyright © 2019. All rights reserved.