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

java.lang.Object
  extended by org.jgrapht.graph.AbstractGraph<V,E>
      extended by org.jgrapht.graph.AbstractBaseGraph<V,E>
          extended by org.jgrapht.graph.DirectedPseudograph<V,E>
              extended by org.javanetworkanalyzer.model.DirectedPseudoG<V,E>
All Implemented Interfaces:
Serializable, Cloneable, DirectedG<V,E>, KeyedGraph<V,E>, org.jgrapht.DirectedGraph<V,E>, org.jgrapht.Graph<V,E>
Direct Known Subclasses:
DirectedWeightedPseudoG

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

A keyed directed pseudograph.

Author:
Adam Gouge
See Also:
Serialized Form

Constructor Summary
DirectedPseudoG(Class<? extends V> vertexClass, Class<? extends E> edgeClass)
          Creates a new directed pseudograph.
DirectedPseudoG(Class<? extends V> vertexClass, org.jgrapht.EdgeFactory<V,E> ef)
          Creates a new directed pseudograph with the specified edge factory.
 
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.AbstractBaseGraph
addEdge, addEdge, addVertex, clone, containsEdge, containsVertex, degreeOf, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, incomingEdgesOf, inDegreeOf, isAllowingLoops, isAllowingMultipleEdges, outDegreeOf, outgoingEdgesOf, removeEdge, removeEdge, removeVertex, setEdgeSetFactory, setEdgeWeight, vertexSet
 
Methods inherited from class org.jgrapht.graph.AbstractGraph
assertVertexExist, containsEdge, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSets
 
Methods inherited from class java.lang.Object
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

DirectedPseudoG

public DirectedPseudoG(Class<? extends V> vertexClass,
                       Class<? extends E> edgeClass)
Creates a new directed pseudograph.

Parameters:
edgeClass - class on which to base factory for edges

DirectedPseudoG

public DirectedPseudoG(Class<? extends V> vertexClass,
                       org.jgrapht.EdgeFactory<V,E> ef)
Creates a new directed pseudograph with the specified edge factory.

Parameters:
ef - the edge factory of the new graph.
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,
                 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.

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.


Copyright © 2014. All Rights Reserved.