net.sf.opendse.model
Class Graph<V extends Node,E extends Edge>

java.lang.Object
  extended by edu.uci.ics.jung.graph.AbstractGraph<V,E>
      extended by edu.uci.ics.jung.graph.SparseGraph<V,E>
          extended by net.sf.opendse.model.Graph<V,E>
Type Parameters:
V - the type of vertices
E - the type of edges
All Implemented Interfaces:
edu.uci.ics.jung.graph.Graph<V,E>, edu.uci.ics.jung.graph.Hypergraph<V,E>, java.io.Serializable, java.lang.Iterable<V>
Direct Known Subclasses:
Application, Architecture, Function

public class Graph<V extends Node,E extends Edge>
extends edu.uci.ics.jung.graph.SparseGraph<V,E>
implements java.lang.Iterable<V>

The Graph is the default graph implementation.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.uci.ics.jung.graph.SparseGraph
directed_edges, INCIDENT, INCOMING, OUTGOING, undirected_edges, vertex_maps
 
Constructor Summary
Graph()
           
 
Method Summary
 E getEdge(E e)
          Return the edge.
 E getEdge(java.lang.String id)
          Return the edge with the specified id.
 V getVertex(java.lang.String id)
          Return the vertex with the specified id.
 V getVertex(V v)
          Return the vertex.
 java.util.Iterator<V> iterator()
           
 boolean removeVertices(java.util.Collection<V> vertices)
          Removes the vertices and returns true if at least one vertex was removed.
 
Methods inherited from class edu.uci.ics.jung.graph.SparseGraph
addEdge, addVertex, containsEdge, containsVertex, findEdge, findEdgeSet, getDefaultEdgeType, getDest, getEdgeCount, getEdgeCount, getEdges, getEdges, getEdgeType, getEndpoints, getFactory, getIncidentEdges, getInEdges, getNeighbors, getOutEdges, getPredecessors, getSource, getSuccessors, getVertexCount, getVertices, isDest, isSource, removeEdge, removeVertex
 
Methods inherited from class edu.uci.ics.jung.graph.AbstractGraph
addEdge, addEdge, addEdge, addEdge, addEdge, degree, getIncidentCount, getIncidentVertices, getNeighborCount, getOpposite, getPredecessorCount, getSuccessorCount, getValidatedEndpoints, inDegree, isIncident, isNeighbor, isPredecessor, isSuccessor, outDegree, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.uci.ics.jung.graph.Graph
addEdge, addEdge, getOpposite, getPredecessorCount, getSuccessorCount, inDegree, isPredecessor, isSuccessor, outDegree
 
Methods inherited from interface edu.uci.ics.jung.graph.Hypergraph
addEdge, addEdge, degree, getIncidentCount, getIncidentVertices, getNeighborCount, isIncident, isNeighbor
 

Constructor Detail

Graph

public Graph()
Method Detail

iterator

public java.util.Iterator<V> iterator()
Specified by:
iterator in interface java.lang.Iterable<V extends Node>

getVertex

public V getVertex(V v)
Return the vertex.

Returns:
the vertex

getEdge

public E getEdge(E e)
Return the edge.

Returns:
the edge

getVertex

public V getVertex(java.lang.String id)
Return the vertex with the specified id.

Parameters:
id - the id
Returns:
the vertex

getEdge

public E getEdge(java.lang.String id)
Return the edge with the specified id.

Parameters:
id - the id
Returns:
the edge

removeVertices

public boolean removeVertices(java.util.Collection<V> vertices)
Removes the vertices and returns true if at least one vertex was removed.

Parameters:
vertices - the vertices to remove
Returns:
true if at least one vertex was removed