Modifier and Type | Field and Description |
---|---|
private int |
count
Number of nodes in the graph.
|
ArrayList<GraphNode> |
nodes
The nodes of the graph.
|
Constructor and Description |
---|
DF_Graph() |
Modifier and Type | Method and Description |
---|---|
void |
addGraphEdge(GraphNode x,
GraphNode y)
Unsupported.
|
void |
addGraphNode(GraphNode x)
Add a new graph node to the graph.
|
void |
compactNodeNumbering()
Implementation for Graph Interface.
|
Enumeration<GraphNode> |
enumerateNodes()
Enumerate the nodes in the graph.
|
int |
numberOfNodes()
Find out how many nodes are in the graph
|
private int count
DF_Graph()
public int numberOfNodes()
Graph
numberOfNodes
in interface Graph
public void compactNodeNumbering()
compactNodeNumbering
in interface Graph
public Enumeration<GraphNode> enumerateNodes()
enumerateNodes
in interface Graph
GraphNode
public void addGraphNode(GraphNode x)
Graph
addGraphNode
in interface Graph
x
- the node to addpublic void addGraphEdge(GraphNode x, GraphNode y)
addGraphEdge
in interface Graph
x
- the source node of the edge to addy
- the target node of the edge to add