Logo Search packages:      
Sourcecode: libjgrapht-java version File versions  Download package

org::_3pq::jgrapht::graph::AsUndirectedGraph Class Reference

Inheritance diagram for org::_3pq::jgrapht::graph::AsUndirectedGraph:

org::_3pq::jgrapht::graph::GraphDelegator org::_3pq::jgrapht::UndirectedGraph org::_3pq::jgrapht::graph::AbstractGraph org::_3pq::jgrapht::Graph org::_3pq::jgrapht::Graph org::_3pq::jgrapht::Graph

List of all members.


Detailed Description

An undirected view of the backing directed graph specified in the constructor. This graph allows modules to apply algorithms designed for undirected graphs to a directed graph by simply ignoring edge direction. If the backing directed graph is an oriented graph, then the view will be a simple graph; otherwise, it will be a multigraph. Query operations on this graph "read through" to the backing graph. Attempts to add edges will result in an 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.

Author:
John V. Sichi
Since:
Aug 14, 2003

Definition at line 84 of file AsUndirectedGraph.java.


Public Member Functions

boolean addAllEdges (Collection edges)
boolean addAllVertices (Collection vertices)
Edge addEdge (Object sourceVertex, Object targetVertex)
boolean addEdge (Edge e)
boolean addVertex (Object v)
 AsUndirectedGraph (DirectedGraph g)
boolean containsEdge (Object sourceVertex, Object targetVertex)
boolean containsEdge (Edge e)
boolean containsVertex (Object v)
int degreeOf (Object vertex)
Set edgeSet ()
List edgesOf (Object vertex)
List getAllEdges (Object sourceVertex, Object targetVertex)
Edge getEdge (Object sourceVertex, Object targetVertex)
EdgeFactory getEdgeFactory ()
List incomingEdgesOf (Object vertex)
int inDegreeOf (Object vertex)
int outDegreeOf (Object vertex)
List outgoingEdgesOf (Object vertex)
List removeAllEdges (Object sourceVertex, Object targetVertex)
boolean removeAllEdges (Collection edges)
boolean removeAllVertices (Collection vertices)
Edge removeEdge (Object sourceVertex, Object targetVertex)
boolean removeEdge (Edge e)
boolean removeVertex (Object v)
String toString ()
Set vertexSet ()

Protected Member Functions

boolean assertVertexExist (Object v)
boolean removeAllEdges (Edge[] edges)
String toStringFromSets (Collection vertexSet, Collection edgeSet)

Static Private Attributes

static final String NO_EDGE_ADD
static final long serialVersionUID = 3257845485078065462L
static final String UNDIRECTED

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index