org.javanetworkanalyzer.model
Class TraversalGraph<V,E>

java.lang.Object
  extended by org.jgrapht.graph.AbstractGraph<V,E>
      extended by org.jgrapht.graph.AbstractBaseGraph<V,E>
          extended by org.jgrapht.graph.DirectedMultigraph<V,E>
              extended by org.javanetworkanalyzer.model.TraversalGraph<V,E>
All Implemented Interfaces:
Serializable, Cloneable, org.jgrapht.DirectedGraph<V,E>, org.jgrapht.Graph<V,E>

public class TraversalGraph<V,E>
extends org.jgrapht.graph.DirectedMultigraph<V,E>

A simple directed graph for shortest path "trees" (multiple shortest paths are allowed) in Dijkstra and BFS as well as DFS traversal graphs.

Author:
Adam Gouge
See Also:
Serialized Form

Constructor Summary
TraversalGraph(Class<? extends E> edgeClass, V root)
          Constructor
TraversalGraph(org.jgrapht.EdgeFactory<V,E> ef, V root)
          Constructor
 
Method Summary
 V getRoot()
          Return the root.
 
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

TraversalGraph

public TraversalGraph(Class<? extends E> edgeClass,
                      V root)
Constructor

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

TraversalGraph

public TraversalGraph(org.jgrapht.EdgeFactory<V,E> ef,
                      V root)
Constructor

Parameters:
ef - the edge factory of the new graph.
root - Root
Method Detail

getRoot

public V getRoot()
Return the root.

Returns:
The root


Copyright © 2014. All Rights Reserved.