Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org._3pq.jgrapht.graph.AbstractGraph
org._3pq.jgrapht.graph.GraphDelegator
org._3pq.jgrapht.graph.AsUndirectedGraph
UnsupportedOperationException
, but vertex addition/removal and
edge removal are all supported (and immediately reflected in the backing
graph).
Note that edges returned by this graph's accessors are really just the edges
of the underlying directed graph. Since there is no interface distinction
between directed and undirected edges, this detail should be irrelevant to
algorithms.
This graph does not pass the hashCode and equals operations through
to the backing graph, but relies on Object's equals and
hashCode methods. This graph will be serializable if the backing
graph is serializable.
Constructor Summary | |
|
Method Summary | |
boolean |
|
Edge |
|
boolean | |
int |
|
List |
|
Edge |
|
int |
|
List |
|
int |
|
List |
|
String |
|
Methods inherited from class org._3pq.jgrapht.graph.GraphDelegator | |
addEdge , addEdge , addVertex , containsEdge , containsVertex , degreeOf , edgeSet , edgesOf , getAllEdges , getEdge , getEdgeFactory , inDegreeOf , incomingEdgesOf , outDegreeOf , outgoingEdgesOf , removeEdge , removeEdge , removeVertex , toString , vertexSet |
Methods inherited from class org._3pq.jgrapht.graph.AbstractGraph | |
addAllEdges , addAllVertices , assertVertexExist , containsEdge , removeAllEdges , removeAllEdges , removeAllEdges , removeAllVertices , toString , toStringFromSets |
public AsUndirectedGraph(DirectedGraph g)
Constructor for AsUndirectedGraph.
- Parameters:
g
- the backing directed graph over which an undirected view is to be created.
public boolean addAllEdges(Collection edges)
- Specified by:
- addAllEdges in interface Graph
- Overrides:
- addAllEdges in interface AbstractGraph
- See Also:
Graph.addAllEdges(Collection)
public Edge addEdge(Object sourceVertex, Object targetVertex)
- Overrides:
- addEdge in interface GraphDelegator
- See Also:
Graph.addEdge(Object,Object)
public boolean addEdge(Edge e)
- Overrides:
- addEdge in interface GraphDelegator
- See Also:
Graph.addEdge(Edge)
public int degreeOf(Object vertex)
- Specified by:
- degreeOf in interface UndirectedGraph
- Overrides:
- degreeOf in interface GraphDelegator
- See Also:
UndirectedGraph.degreeOf(Object)
public List getAllEdges(Object sourceVertex, Object targetVertex)
- Specified by:
- getAllEdges in interface Graph
- Overrides:
- getAllEdges in interface GraphDelegator
- See Also:
Graph.getAllEdges(Object,Object)
public Edge getEdge(Object sourceVertex, Object targetVertex)
- Overrides:
- getEdge in interface GraphDelegator
- See Also:
Graph.getEdge(Object,Object)
public int inDegreeOf(Object vertex)
- Overrides:
- inDegreeOf in interface GraphDelegator
- See Also:
DirectedGraph.inDegreeOf(Object)
public List incomingEdgesOf(Object vertex)
- Overrides:
- incomingEdgesOf in interface GraphDelegator
public int outDegreeOf(Object vertex)
- Overrides:
- outDegreeOf in interface GraphDelegator
- See Also:
DirectedGraph.outDegreeOf(Object)
public List outgoingEdgesOf(Object vertex)
- Overrides:
- outgoingEdgesOf in interface GraphDelegator
public String toString()
- Overrides:
- toString in interface GraphDelegator
- See Also:
AbstractBaseGraph.toString()