Package net.sf.opendse.model
Class Graph<V extends Node,E extends Edge>
java.lang.Object
edu.uci.ics.jung.graph.AbstractGraph<V,E>
edu.uci.ics.jung.graph.SparseMultigraph<V,E>
net.sf.opendse.model.Graph<V,E>
- Type Parameters:
V- the type of verticesE- the type of edges
- All Implemented Interfaces:
Graph<V,,E> Hypergraph<V,,E> MultiGraph<V,,E> Serializable,Iterable<V>
- Direct Known Subclasses:
Application,Architecture,Function
public class Graph<V extends Node,E extends Edge>
extends SparseMultigraph<V,E>
implements Iterable<V>
The
Graph is the default graph implementation.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the edge.Return the edge with the specified id ornullif no edge with the givenidexists.Return the vertex with the specified id ornullif no vertex with the givenidexists.Return the vertex.iterator()booleanremoveVertices(Collection<V> vertices) Removes the vertices and returnstrueif at least one vertex was removed.Methods inherited from class edu.uci.ics.jung.graph.SparseMultigraph
addEdge, addVertex, containsEdge, containsVertex, findEdge, getDefaultEdgeType, getDest, getEdgeCount, getEdgeCount, getEdges, getEdges, getEdgeType, getEndpoints, getFactory, getIncidentEdges, getInEdges, getNeighbors, getOutEdges, getPredecessors, getSource, getSuccessors, getVertexCount, getVertices, isDest, isSource, removeEdge, removeVertexMethods inherited from class edu.uci.ics.jung.graph.AbstractGraph
addEdge, addEdge, addEdge, addEdge, addEdge, degree, findEdgeSet, getIncidentCount, getIncidentVertices, getNeighborCount, getOpposite, getPredecessorCount, getSuccessorCount, inDegree, isIncident, isNeighbor, isPredecessor, isSuccessor, outDegree, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Graph
public Graph()
-
-
Method Details
-
iterator
-
getVertex
Return the vertex.- Parameters:
v- the vertex- Returns:
- the vertex
-
getEdge
Return the edge.- Parameters:
e- the edge- Returns:
- the edge
-
getVertex
Return the vertex with the specified id ornullif no vertex with the givenidexists.- Parameters:
id- the id- Returns:
- the vertex
-
getEdge
Return the edge with the specified id ornullif no edge with the givenidexists.- Parameters:
id- the id- Returns:
- the edge
-
removeVertices
Removes the vertices and returnstrueif at least one vertex was removed.- Parameters:
vertices- the vertices to remove- Returns:
- true if at least one vertex was removed
-