| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsalvo.jesus.graph.GraphImpl
salvo.jesus.graph.WeightedGraphImpl
gr.demokritos.iit.jinsect.structs.Graph
public class Graph
A weighted graph, where the vertices have unique labels.
| Field Summary | |
|---|---|
| protected  EdgeCachedLocator | eclLocatorOptimized edge locator. | 
|  java.util.HashMap | UniqueVerticesThe map of vertices and labels. | 
| Fields inherited from class salvo.jesus.graph.GraphImpl | 
|---|
| factory, traversal | 
| Constructor Summary | |
|---|---|
| Graph()Initializes the graph. | |
| Method Summary | |
|---|---|
|  void | add(salvo.jesus.graph.Vertex v)Adds a new vertex to the graph, checking for duplicate labels. | 
|  salvo.jesus.graph.Edge | addEdge(salvo.jesus.graph.Vertex vHead,
        salvo.jesus.graph.Vertex vTail)Adds a new edge to the graph, checking for duplicate labels of its vertices. | 
|  boolean | contains(salvo.jesus.graph.Vertex v)Checks whether a given vertex exists in this graph. | 
|  salvo.jesus.graph.Vertex | locateVertex(salvo.jesus.graph.Vertex v)Looks up a given vertex in this graph. | 
|  void | remove(salvo.jesus.graph.Vertex v)Removes a given vertex from this graph. | 
| Methods inherited from class salvo.jesus.graph.WeightedGraphImpl | 
|---|
| addEdge, getClosest, minimumSpanningTree, setMinimumSpanningTreeAlgorithm, setShortestPathAlgorithm, shortestPath | 
| Methods inherited from class salvo.jesus.graph.GraphImpl | 
|---|
| addEdge, addGraphAddEdgeListener, addGraphAddVertexListener, addGraphRemoveEdgeListener, addGraphRemoveVertexListener, addListener, cloneVertices, containsEdge, containsVertex, forgetConnectedSets, getAdjacentVertices, getAdjacentVertices, getConnectedSet, getConnectedSet, getDegree, getDegree, getEdges, getEdgesCount, getEdgeSet, getGraphFactory, getTraversal, getVertexSet, getVertices, getVerticesCount, getVerticesIterator, isConnected, removeEdge, removeEdges, removeGraphAddEdgeListener, removeGraphAddVertexListener, removeGraphRemoveEdgeListener, removeGraphRemoveVertexListener, removeListener, setGraphFactory, setTraversal, toString, traverse | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface salvo.jesus.graph.Graph | 
|---|
| addEdge, addGraphAddEdgeListener, addGraphAddVertexListener, addGraphRemoveEdgeListener, addGraphRemoveVertexListener, addListener, cloneVertices, getAdjacentVertices, getAdjacentVertices, getConnectedSet, getConnectedSet, getDegree, getDegree, getEdges, getEdgesCount, getEdgeSet, getGraphFactory, getTraversal, getVertexSet, getVertices, getVerticesCount, getVerticesIterator, isConnected, removeEdge, removeEdges, removeGraphAddEdgeListener, removeGraphAddVertexListener, removeGraphRemoveEdgeListener, removeGraphRemoveVertexListener, removeListener, setGraphFactory, setTraversal, traverse | 
| Field Detail | 
|---|
public java.util.HashMap UniqueVertices
protected EdgeCachedLocator eclLocator
| Constructor Detail | 
|---|
public Graph()
| Method Detail | 
|---|
public boolean contains(salvo.jesus.graph.Vertex v)
v - The vertex, the label of which will be used for the lookup.
public salvo.jesus.graph.Vertex locateVertex(salvo.jesus.graph.Vertex v)
v - The vertex, the label of which will be used for the lookup.
public void add(salvo.jesus.graph.Vertex v)
         throws java.lang.Exception
add in interface salvo.jesus.graph.Graphadd in class salvo.jesus.graph.GraphImplv - The vertex to add.
java.lang.Exception - If a vertex with the same label already exists.
public salvo.jesus.graph.Edge addEdge(salvo.jesus.graph.Vertex vHead,
                                      salvo.jesus.graph.Vertex vTail)
                               throws java.lang.Exception
addEdge in interface salvo.jesus.graph.GraphaddEdge in class salvo.jesus.graph.GraphImplvHead - The edge head to add.vTail - The edge tail to add.
java.lang.Exception - If the edge cannot be added.
public void remove(salvo.jesus.graph.Vertex v)
            throws java.lang.Exception
remove in interface salvo.jesus.graph.Graphremove in class salvo.jesus.graph.GraphImplv - The vertex to remove.
java.lang.Exception - If the vertex cannot be removed.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||