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

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.transformation.DirectionTransformer

public class DirectionTransformer
extends Object

Functions for transforming graphs into directed or undirected graphs.

Author:
Danyel Fisher, Joshua O'Madadhain

Constructor Summary
DirectionTransformer()
           
 
Method Summary
static
<V,E> Graph<V,E>
toDirected(Graph<V,E> graph, org.apache.commons.collections15.Factory<DirectedGraph<V,E>> graph_factory, org.apache.commons.collections15.Factory<E> edge_factory, boolean create_new)
          Transforms graph (which may be of any directionality) into a directed graph.
static
<V,E> UndirectedGraph<V,E>
toUndirected(Graph<V,E> graph, org.apache.commons.collections15.Factory<UndirectedGraph<V,E>> graph_factory, org.apache.commons.collections15.Factory<E> edge_factory, boolean create_new)
          Transforms graph (which may be of any directionality) into an undirected graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectionTransformer

public DirectionTransformer()
Method Detail

toUndirected

public static <V,E> UndirectedGraph<V,E> toUndirected(Graph<V,E> graph,
                                                      org.apache.commons.collections15.Factory<UndirectedGraph<V,E>> graph_factory,
                                                      org.apache.commons.collections15.Factory<E> edge_factory,
                                                      boolean create_new)
Transforms graph (which may be of any directionality) into an undirected graph. (This may be useful for visualization tasks). Specifically:

Parameters:
graph - the graph to be transformed
create_new - specifies whether existing undirected edges are to be copied or recreated
graph_factory - used to create the new graph object
edge_factory - used to create new edges
Returns:
the transformed Graph

toDirected

public static <V,E> Graph<V,E> toDirected(Graph<V,E> graph,
                                          org.apache.commons.collections15.Factory<DirectedGraph<V,E>> graph_factory,
                                          org.apache.commons.collections15.Factory<E> edge_factory,
                                          boolean create_new)
Transforms graph (which may be of any directionality) into a directed graph. Specifically:

Parameters:
graph - the graph to be transformed
create_new - specifies whether existing directed edges are to be copied or recreated
graph_factory - used to create the new graph object
edge_factory - used to create new edges
Returns:
the transformed Graph


Copyright © 2009. All Rights Reserved.