edu.uci.ics.jung.algorithms.transformation
Class DirectionTransformer

java.lang.Object
  extended byedu.uci.ics.jung.algorithms.transformation.DirectionTransformer

public class DirectionTransformer
extends java.lang.Object

Author:
danyelf

Constructor Summary
DirectionTransformer()
           
 
Method Summary
static DirectedGraph toDirected(Graph graph)
          Transforms graph (which may be either undirected or mixed) into a directed graph without parallel edges.
static UndirectedGraph toUndirected(Graph dGraph)
          Transforms graph (which may be either directed or mixed) into an undirected graph without parallel edges.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectionTransformer

public DirectionTransformer()
Method Detail

toUndirected

public static UndirectedGraph toUndirected(Graph dGraph)
Transforms graph (which may be either directed or mixed) into an undirected graph without parallel edges. (This is likely to be very useful for visualization tasks). Creates exactly one undirected edge (a, b) iff a isNeighborOf b

Parameters:
dGraph -
Returns:

toDirected

public static DirectedGraph toDirected(Graph graph)
Transforms graph (which may be either undirected or mixed) into a directed graph without parallel edges. Creates exactly one directed edge (a, b) iff a isPredecessorOf b (so an UndirectedEdge will actually produce two edges).