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
-
Method Summary
Modifier and TypeMethodDescriptionReturn the edge.Return the edge with the specified id ornull
if no edge with the givenid
exists.Return the vertex with the specified id ornull
if no vertex with the givenid
exists.Return the vertex.iterator()
boolean
removeVertices
(Collection<V> vertices) Removes the vertices and returnstrue
if 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, removeVertex
Methods 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, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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 ornull
if no vertex with the givenid
exists.- Parameters:
id
- the id- Returns:
- the vertex
-
getEdge
Return the edge with the specified id ornull
if no edge with the givenid
exists.- Parameters:
id
- the id- Returns:
- the edge
-
removeVertices
Removes the vertices and returnstrue
if at least one vertex was removed.- Parameters:
vertices
- the vertices to remove- Returns:
- true if at least one vertex was removed
-