org.javanetworkanalyzer.model
Class EdgeReversedG<V extends VId,E extends EdgeID>

java.lang.Object
  extended by org.jgrapht.graph.AbstractGraph<V,E>
      extended by org.jgrapht.graph.GraphDelegator<V,E>
          extended by org.jgrapht.graph.EdgeReversedGraph<V,E>
              extended by org.javanetworkanalyzer.model.EdgeReversedG<V,E>
All Implemented Interfaces:
Serializable, DirectedG<V,E>, KeyedGraph<V,E>, org.jgrapht.DirectedGraph<V,E>, org.jgrapht.Graph<V,E>
Direct Known Subclasses:
WeightedEdgeReversedG

public class EdgeReversedG<V extends VId,E extends EdgeID>
extends org.jgrapht.graph.EdgeReversedGraph<V,E>
implements DirectedG<V,E>

Provides an edge-reversed view of a directed graph.

Author:
Adam Gouge
See Also:
Serialized Form

Constructor Summary
EdgeReversedG(DirectedG<V,E> g)
           
 
Method Summary
 E addEdge(int source, int target)
          Add an edge from the vertex with id source to the vertex with id target.
 E addEdge(int source, int target, int edgeID)
          Add an edge from the vertex with id source to the vertex with id target and set the edge id.
 boolean addVertex(int id)
          Add a vertex with the given id.
 V getVertex(int id)
          Get the vertex with the given id.
 
Methods inherited from class org.jgrapht.graph.EdgeReversedGraph
addEdge, addEdge, getAllEdges, getEdge, getEdgeSource, getEdgeTarget, incomingEdgesOf, inDegreeOf, outDegreeOf, outgoingEdgesOf, removeEdge, toString
 
Methods inherited from class org.jgrapht.graph.GraphDelegator
addVertex, containsEdge, containsVertex, degreeOf, edgeSet, edgesOf, getEdgeFactory, getEdgeWeight, removeEdge, removeVertex, setEdgeWeight, vertexSet
 
Methods inherited from class org.jgrapht.graph.AbstractGraph
assertVertexExist, containsEdge, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toStringFromSets
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jgrapht.DirectedGraph
incomingEdgesOf, inDegreeOf, outDegreeOf, outgoingEdgesOf
 
Methods inherited from interface org.jgrapht.Graph
addEdge, addEdge, addVertex, containsEdge, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, vertexSet
 

Constructor Detail

EdgeReversedG

public EdgeReversedG(DirectedG<V,E> g)
              throws NoSuchMethodException
Throws:
NoSuchMethodException
Method Detail

addVertex

public boolean addVertex(int id)
Description copied from interface: KeyedGraph
Add a vertex with the given id.

Specified by:
addVertex in interface KeyedGraph<V extends VId,E extends EdgeID>
Parameters:
id - Id
Returns:
True if the vertex was added.

getVertex

public V getVertex(int id)
Description copied from interface: KeyedGraph
Get the vertex with the given id.

Specified by:
getVertex in interface KeyedGraph<V extends VId,E extends EdgeID>
Parameters:
id - Id.
Returns:
The vertex with the given id.

addEdge

public E addEdge(int source,
                 int target)
Description copied from interface: KeyedGraph
Add an edge from the vertex with id source to the vertex with id target.

Specified by:
addEdge in interface KeyedGraph<V extends VId,E extends EdgeID>
Parameters:
source - Source id.
target - Target Id.
Returns:
The newly added edge, or null if it was not added.

addEdge

public E addEdge(int source,
                 int target,
                 int edgeID)
Description copied from interface: KeyedGraph
Add an edge from the vertex with id source to the vertex with id target and set the edge id.

Specified by:
addEdge in interface KeyedGraph<V extends VId,E extends EdgeID>
Parameters:
source - Source id.
target - Target id.
edgeID - Edge id.
Returns:
The newly added edge, or null if it was not added.


Copyright © 2014. All Rights Reserved.