|
||||||||||
| 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.UniqueVertexGraph
public class UniqueVertexGraph
A weighted graph, where the vertices have unique labels.
| Field Summary | |
|---|---|
java.util.HashMap<java.lang.String,salvo.jesus.graph.Vertex> |
UniqueVertices
The map of vertices and labels. |
| Fields inherited from class salvo.jesus.graph.GraphImpl |
|---|
factory, traversal |
| Constructor Summary | |
|---|---|
UniqueVertexGraph()
Initializes the graph. |
|
| Method Summary | |
|---|---|
void |
add(salvo.jesus.graph.Vertex v)
Adds a new vertex to the graph, checking for duplicate labels. |
void |
addEdge(salvo.jesus.graph.Edge edge)
Adds a new edge to the graph, checking for duplicate labels of its vertices. |
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. |
static void |
main(java.lang.String[] args)
|
| Methods inherited from class salvo.jesus.graph.WeightedGraphImpl |
|---|
addEdge, getClosest, minimumSpanningTree, setMinimumSpanningTreeAlgorithm, setShortestPathAlgorithm, shortestPath |
| Methods inherited from class salvo.jesus.graph.GraphImpl |
|---|
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, remove, 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 |
|---|
addGraphAddEdgeListener, addGraphAddVertexListener, addGraphRemoveEdgeListener, addGraphRemoveVertexListener, addListener, cloneVertices, getAdjacentVertices, getAdjacentVertices, getConnectedSet, getConnectedSet, getDegree, getDegree, getEdges, getEdgesCount, getEdgeSet, getGraphFactory, getTraversal, getVertexSet, getVertices, getVerticesCount, getVerticesIterator, isConnected, remove, removeEdge, removeEdges, removeGraphAddEdgeListener, removeGraphAddVertexListener, removeGraphRemoveEdgeListener, removeGraphRemoveVertexListener, removeListener, setGraphFactory, setTraversal, traverse |
| Field Detail |
|---|
public java.util.HashMap<java.lang.String,salvo.jesus.graph.Vertex> UniqueVertices
| Constructor Detail |
|---|
public UniqueVertexGraph()
| 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 addEdge(salvo.jesus.graph.Edge edge)
throws java.lang.Exception
addEdge in interface salvo.jesus.graph.GraphaddEdge in class salvo.jesus.graph.GraphImpleEdge - The edge to add.
java.lang.Exception - If the edge cannot be added.public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||