| Package | Description |
|---|---|
| berack96.lib.graph | |
| berack96.lib.graph.impl | |
| berack96.lib.graph.view | |
| berack96.lib.graph.view.edge | |
| berack96.lib.graph.visit | |
| berack96.lib.graph.visit.impl |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<V,java.util.List<Edge<V,W>>> |
Graph.distance(V source)
Get the minimum path from the source vertex to all the possible reachable vertices.
|
java.util.List<Edge<V,W>> |
Graph.distance(V source,
V destination)
Get the minimum path from the source vertex to the destination vertex.
If the source vertex can't reach the destination, then an exception is thrown. |
java.util.Collection<Edge<V,W>> |
Graph.edges()
Get all the edges in the graph.
If the graph doesn't contains edges, it'll return an empty collection. Note: depending on the implementation, modifying the returned collection could affect the graph behavior and the changes could be reflected to the graph. |
java.util.Collection<Edge<V,W>> |
Graph.edgesOf(V vertex)
Retrieve all the edges of a particular vertex.
Note: the edges that are returned are the one that goes IN this vertex AND the edges that goes OUT of it. Note2: depending on the implementation, modifying the returned collection could affect the graph behavior and the changes could be reflected to the graph. |
java.util.Collection<Edge<V,java.lang.Number>> |
Vertex.getEdgesIn()
Get all the edge that goes INTO this vertex
|
java.util.Collection<Edge<V,W>> |
Graph.getEdgesIn(V vertex)
Retrieve all the edges of a particular vertex.
Note: the edges that are returned are the one that have this vertex as destination and another as source. Note2: depending on the implementation, modifying the returned collection could affect the graph behavior and the changes could be reflected to the graph. |
java.util.Collection<Edge<V,java.lang.Number>> |
Vertex.getEdgesOut()
Get all the edge that goes OUT of this vertex
|
java.util.Collection<Edge<V,W>> |
Graph.getEdgesOut(V vertex)
Retrieve all the edges that goes OUT of a particular vertex.
Note: the edges that are returned are the one that have this vertex as source and another one as destination. Note2: depending on the implementation, modifying the returned collection could affect the graph behavior and the changes could be reflected to the graph. |
| Modifier and Type | Method and Description |
|---|---|
W |
Graph.addEdge(Edge<V,W> edge)
Add an edge between the two vertex.
The edge will be created from the vertex source of the edge and the vertex destination of it This method will overwrite any existing edge between the two vertex. If there was a previous edge then it is returned |
W |
Graph.addEdgeAndVertices(Edge<V,W> edge)
This particular function add an edge to the graph.
If one of the two, or both vertices of the edge aren't contained in the graph, then the vertices will be added. The edge will be created from the vertex source of the edge and the vertex destination of it This method will overwrite any existing edge between the two vertex. If there was a previous edge then it is returned |
| Modifier and Type | Method and Description |
|---|---|
void |
Graph.addAllEdges(java.util.Collection<Edge<V,W>> edges)
Add all the edges of the collection to the graph.
If one of the two, or both vertices aren't contained in the graph, then the vertices will be added. Any null edges will be ignored. This method will overwrite any existing edge between the two vertex. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<V,java.util.List<Edge<V,W>>> |
MatrixGraph.distance(V source) |
java.util.Map<V,java.util.List<Edge<V,W>>> |
MapGraph.distance(V source) |
java.util.Map<V,java.util.List<Edge<V,W>>> |
AdjGraph.distance(V source) |
java.util.List<Edge<V,W>> |
MatrixGraph.distance(V source,
V destination) |
java.util.List<Edge<V,W>> |
MapGraph.distance(V source,
V destination) |
java.util.List<Edge<V,W>> |
AdjGraph.distance(V source,
V destination) |
java.util.Collection<Edge<V,W>> |
MatrixGraph.edges() |
java.util.Collection<Edge<V,W>> |
MapGraph.edges() |
java.util.Collection<Edge<V,W>> |
AdjGraph.edges() |
java.util.Collection<Edge<V,W>> |
MatrixGraph.edgesOf(V vertex) |
java.util.Collection<Edge<V,W>> |
MapGraph.edgesOf(V vertex) |
java.util.Collection<Edge<V,W>> |
AdjGraph.edgesOf(V vertex) |
java.util.Collection<Edge<V,W>> |
MatrixGraph.getEdgesIn(V vertex) |
java.util.Collection<Edge<V,W>> |
MapGraph.getEdgesIn(V vertex) |
java.util.Collection<Edge<V,W>> |
AdjGraph.getEdgesIn(V vertex) |
java.util.Collection<Edge<V,W>> |
MatrixGraph.getEdgesOut(V vertex) |
java.util.Collection<Edge<V,W>> |
MapGraph.getEdgesOut(V vertex) |
java.util.Collection<Edge<V,W>> |
AdjGraph.getEdgesOut(V vertex) |
| Modifier and Type | Method and Description |
|---|---|
W |
MatrixGraph.addEdge(Edge<V,W> edge) |
W |
MapGraph.addEdge(Edge<V,W> edge) |
W |
AdjGraph.addEdge(Edge<V,W> edge) |
W |
MatrixGraph.addEdgeAndVertices(Edge<V,W> edge) |
W |
MapGraph.addEdgeAndVertices(Edge<V,W> edge) |
W |
AdjGraph.addEdgeAndVertices(Edge<V,W> edge) |
| Modifier and Type | Method and Description |
|---|---|
void |
MatrixGraph.addAllEdges(java.util.Collection<Edge<V,W>> edges) |
void |
MapGraph.addAllEdges(java.util.Collection<Edge<V,W>> edges) |
void |
AdjGraph.addAllEdges(java.util.Collection<Edge<V,W>> edges) |
| Modifier and Type | Method and Description |
|---|---|
void |
GraphPanel.addEdge(Edge<V,W> edge) |
| Modifier and Type | Field and Description |
|---|---|
Edge<V,W> |
EdgeComponent.edge |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Edge<V,W>> |
VisitDistSourceDest.distance(Graph<V,W> graph,
V source,
V destination)
Get the distance from the source to the destination
The list contains the minimum path from the vertex marked as source to the destination vertex |
java.util.Map<V,java.util.List<Edge<V,W>>> |
VisitDistance.getLastDistance()
Get the last calculated distance to all the possible destinations
The map contains all the possible vertices that are reachable from the source set in the visit If there is no path between the destination and the source, then null is returned as accordingly to the map interface If the visit is not already been done, then the map is null. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<V,java.util.List<Edge<V,W>>> |
Dijkstra.getLastDistance() |