Package | Description |
---|---|
org.jboss.util.graph |
Modifier and Type | Method and Description |
---|---|
Vertex<T> |
Graph.findVertexByData(T data,
Comparator<T> compare)
Search the verticies for one with data.
|
Vertex<T> |
Graph.findVertexByName(String name)
Search the verticies for one with name.
|
Vertex<T> |
Edge.getFrom()
Get the starting vertex
|
Vertex<T> |
Graph.getRootVertex()
Get the root vertex
|
Vertex<T> |
Edge.getTo()
Get the ending vertex
|
Vertex<T> |
Graph.getVertex(int n)
Get the given Vertex.
|
Modifier and Type | Method and Description |
---|---|
List<Vertex<T>> |
Graph.getVerticies()
Get the graph verticies
|
Modifier and Type | Method and Description |
---|---|
boolean |
Graph.addEdge(Vertex<T> from,
Vertex<T> to,
int cost)
Insert a directed, weighted Edge
|
boolean |
Graph.addEdge(Vertex<T> from,
Vertex<T> to,
int cost)
Insert a directed, weighted Edge
|
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 Exception> |
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 Exception> |
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
|
boolean |
Graph.insertBiEdge(Vertex<T> from,
Vertex<T> to,
int cost)
Insert a bidirectional Edge
|
boolean |
Graph.removeEdge(Vertex<T> from,
Vertex<T> to)
Remove an Edge
|
boolean |
Graph.removeEdge(Vertex<T> from,
Vertex<T> to)
Remove an Edge
|
boolean |
Graph.removeVertex(Vertex<T> v)
Remove a vertex from the graph
|
void |
Graph.setRootVertex(Vertex<T> root)
Set a root vertex.
|
void |
Visitor.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)
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.
|
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.
|
Constructor and Description |
---|
Edge(Vertex<T> from,
Vertex<T> to)
Create a zero cost edge between from and to
|
Edge(Vertex<T> from,
Vertex<T> to)
Create a zero cost edge between from and to
|
Edge(Vertex<T> from,
Vertex<T> to,
int cost)
Create an edge between from and to with the given cost.
|
Edge(Vertex<T> from,
Vertex<T> to,
int cost)
Create an edge between from and to with the given cost.
|
Copyright © 2018 JBoss by Red Hat. All rights reserved.