scratch.tom.simpleGraph
Class GraphUtils

java.lang.Object
  extended by scratch.tom.simpleGraph.GraphUtils

public class GraphUtils
extends Object


Constructor Summary
GraphUtils()
           
 
Method Summary
static
<V,E extends DirectedEdge<V>>
void
doSomethingThatNeedsDirectedGraph(Graph<V,E> graph)
           
static
<V,E extends Edge>
int
getDegree(Graph<V,E> graph, V vertex)
           
static
<V,E extends Edge>
Collection<V>
getNeighbors(Graph<V,E> graph, V vertex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphUtils

public GraphUtils()
Method Detail

doSomethingThatNeedsDirectedGraph

public static <V,E extends DirectedEdge<V>> void doSomethingThatNeedsDirectedGraph(Graph<V,E> graph)

getDegree

public static <V,E extends Edge> int getDegree(Graph<V,E> graph,
                                               V vertex)

getNeighbors

public static <V,E extends Edge> Collection<V> getNeighbors(Graph<V,E> graph,
                                                            V vertex)