boolean |
Graph.addEdge(Vertex<T> from,
Vertex<T> to,
int cost) |
Insert a directed, weighted Edge into the graph.
|
void |
Vertex.addIncomingEdge(Vertex<T> from,
int cost) |
Add an incoming edge starting at from
|
void |
Vertex.addOutgoingEdge(Vertex<T> to,
int cost) |
Add an outgoing edge ending at to.
|
boolean |
Graph.addVertex(Vertex<T> v) |
Add a vertex to the graph
|
void |
Graph.breadthFirstSearch(Vertex<T> v,
Visitor<T> visitor) |
Perform a breadth first search of this graph, starting at v.
|
<E extends java.lang.Exception> void |
Graph.breadthFirstSearch(Vertex<T> v,
VisitorEX<T,E> visitor) |
Perform a breadth first search of this graph, starting at v.
|
int |
Vertex.cost(Vertex<T> dest) |
What is the cost from this vertext to the dest vertex.
|
void |
Graph.depthFirstSearch(Vertex<T> v,
Visitor<T> visitor) |
Perform a depth first serach using recursion.
|
<E extends java.lang.Exception> void |
Graph.depthFirstSearch(Vertex<T> v,
VisitorEX<T,E> visitor) |
Perform a depth first serach using recursion.
|
void |
Graph.dfsSpanningTree(Vertex<T> v,
DFSVisitor<T> visitor) |
Find the spanning tree using a DFS starting from v.
|
Edge<T> |
Vertex.findEdge(Vertex<T> dest) |
Search the outgoing edges looking for an edge whose's
edge.to == dest.
|
boolean |
Vertex.hasEdge(Vertex<T> dest) |
Is there an outgoing edge ending at dest.
|
boolean |
Graph.insertBiEdge(Vertex<T> from,
Vertex<T> to,
int cost) |
Insert a bidirectional Edge in the graph
|
boolean |
Graph.removeEdge(Vertex<T> from,
Vertex<T> to) |
Remove an Edge from the graph
|
boolean |
Graph.removeVertex(Vertex<T> v) |
Remove a vertex from the graph
|
void |
Graph.setRootVertex(Vertex<T> root) |
Set a root vertex.
|
void |
DFSVisitor.visit(Graph<T> g,
Vertex<T> v) |
Called by the graph traversal methods when a vertex is first visited.
|
void |
DFSVisitor.visit(Graph<T> g,
Vertex<T> v,
Edge<T> e) |
Used dfsSpanningTree to notify the visitor of each outgoing edge to
an unvisited vertex.
|
private void |
Graph.visit(Vertex<T> v,
java.util.ArrayList<Edge<T>> cycleEdges) |
|
void |
Visitor.visit(Graph<T> g,
Vertex<T> v) |
Called by the graph traversal methods when a vertex is first visited.
|
void |
VisitorEX.visit(Graph<T> g,
Vertex<T> v) |
Called by the graph traversal methods when a vertex is first visited.
|