Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.util
Class GraphSetUtils

java.lang.Object
  extended by cytoscape.util.GraphSetUtils

public class GraphSetUtils
extends Object

Class contains various static methods to perform set-like operations on graph.

Author:
Ryan Kelley

Constructor Summary
GraphSetUtils()
           
 
Method Summary
static CyNetwork createDifferenceGraph(List networkList, boolean copyView, String title)
          Create a new graph which is the difference of multiple graphs.
static CyNetwork createIntersectionGraph(List networkList, boolean copyView, String title)
          Create a new graph which is the intersection of multiple graphs.
static CyNetwork createUnionGraph(List networkList, boolean copyView, String title)
          Create a new graph which is the union of multiple graphs.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphSetUtils

public GraphSetUtils()
Method Detail

createUnionGraph

public static CyNetwork createUnionGraph(List networkList,
                                         boolean copyView,
                                         String title)
Create a new graph which is the union of multiple graphs. The union graph is created by applying the set union on both the edges and the nodes.

Parameters:
networkList - A list containing all of the networks.
copyView - This argument is ignored.
title - The title of the new network
Returns:
A cyNetwork which is the union of the input graphs

createIntersectionGraph

public static CyNetwork createIntersectionGraph(List networkList,
                                                boolean copyView,
                                                String title)
Create a new graph which is the intersection of multiple graphs. The intersection graph is created by applying the set intersection on both the edges and the nodes.

Parameters:
networkList - A list containing all of the networks.
copyView - This argument is ignored.
title - The title of the new network
Returns:
A cyNetwork which is the intersection of the input graphs

createDifferenceGraph

public static CyNetwork createDifferenceGraph(List networkList,
                                              boolean copyView,
                                              String title)
Create a new graph which is the difference of multiple graphs. Note that this is not the symmetric difference. The second graph in the list (and the third and the fourth ... ) are subtracted from the first graph. Here, we can not directly apply the set difference on the nodes and edge sets and get a valid graph. Therefore, we apply the difference operation on the edge sets firsts and add those nodes in the node difference set which are required for those edges to exist.

Parameters:
networkList - A list containing all of the networks.
copyView - This argument is ignored.
title - The title of the new network
Returns:
A cyNetwork which is the difference of the input graphs

www.cytoscape.org