Graph<DataT,NodeT,NodeT> Class
- java.
lang. Object - com.
microsoft. azure. management. resources. fluentcore. dag. Graph<DataT,NodeT,NodeT>
- com.
Type Parameters
- DataT
the type of the data stored in the graph's nodes
- NodeT
the type of the nodes in the graph
- NodeT
the type of the nodes in the graph
public class Graph<DataT,NodeT extends Node<DataT,NodeT>>
Type representing a directed graph data structure.
Each node in a graph is represented by Node<DataT,NodeT>
Field Summary
Modifier and Type | Field and Description |
---|---|
Map<String, NodeT> |
graph
the underlying graph. |
Constructor Summary
Constructor | Description |
---|---|
Graph() |
Creates a directed graph. |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
addNode(NodeT node)
Adds a node to this graph. |
String | findPath(String start, String end) |
Collection<NodeT> | getNodes() |
void |
visit(Visitor visitor)
Perform DFS visit in this graph. The directed graph will be traversed in DFS order and the visitor will be notified as search explores each node and edge. |
Field Details
graph
protected Map
the underlying graph.
Constructor Details
Graph
public Graph()
Creates a directed graph.
Method Details
addNode
public void addNode(NodeT node)
Adds a node to this graph.
Parameters:
findPath
protected String findPath(String start, String end)
Parameters:
getNodes
public Collection
Returns:
visit
public void visit(Visitor visitor)
Perform DFS visit in this graph.
The directed graph will be traversed in DFS order and the visitor will be notified as search explores each node and edge.
Parameters:
Applies to
Azure SDK for Java