Class PartitionUtil


  • public final class PartitionUtil
    extends Object
    This class also provides static methods that are used to partition a network.

    Module: layout-api

    To use this in your app, include the following dependency in your POM:

    <dependency>
        <groupId>org.cytoscape</groupId>
        <artifactId>layout-api</artifactId>
    </dependency>

    Cytoscape Backwards Compatibility (Static Class): This class is static and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
    • Method Detail

      • partition

        public static List<LayoutPartition> partition​(CyNetworkView networkView,
                                                      boolean selectedOnly,
                                                      EdgeWeighter edgeWeighter)
        Partition the graph -- this builds the LayoutEdge and LayoutNode arrays as a byproduct. The algorithm for this was taken from algorithms/graphPartition/SGraphPartition.java.
        Parameters:
        networkView - the CyNetworkView representing the graph
        selectedOnly - only consider selected nodes
        edgeWeighter - the weighter to use for edge weighting
        Returns:
        a List of LayoutPartitions
      • partition

        public static List<LayoutPartition> partition​(CyNetworkView networkView,
                                                      Collection<CyNode> nodeSet,
                                                      EdgeWeighter edgeWeighter)
        Partition the graph -- this builds the LayoutEdge and LayoutNode arrays as a byproduct. The algorithm for this was taken from algorithms/graphPartition/SGraphPartition.java.
        Parameters:
        networkView - the CyNetworkView representing the graph
        nodeSet - the set of nodes to consider
        edgeWeighter - the weighter to use for edge weighting
        Returns:
        a List of LayoutPartitions