Documentation of 'edu.uci.ics.jung.algorithms.transformation.VertexPartitionCollapser' Java class
VertexPartitionCollapser
edu.uci.ics.jung.algorithms.transformation

Class VertexPartitionCollapser<V,E,CV,CE>



  • public class VertexPartitionCollapser<V,E,CV,CE>
    extends java.lang.Object
    This class transforms a graph with a known vertex partitioning into a graph whose vertices correspond to the input graph's partitions. Two vertices in the output graph are connected if and only if there exists at least one edge between vertices in the corresponding partitions of the input graph. If the output graph permits parallel edges, there will be an edge connecting two vertices in the new graph for each such edge connecting constituent vertices in the input graph.

    Concept based on Danyel Fisher's GraphCollapser in JUNG 1.x.

    • Constructor Summary

      Constructors 
      Constructor and Description
      VertexPartitionCollapser(com.google.common.base.Supplier<Graph<CV,CE>> graph_factory, com.google.common.base.Supplier<CV> vertex_factory, com.google.common.base.Supplier<CE> edge_factory)
      Creates an instance with the specified graph and element factories.
    • Constructor Detail

      • VertexPartitionCollapser

        public VertexPartitionCollapser(com.google.common.base.Supplier<Graph<CV,CE>> graph_factory,
                                        com.google.common.base.Supplier<CV> vertex_factory,
                                        com.google.common.base.Supplier<CE> edge_factory)
        Creates an instance with the specified graph and element factories.
        Parameters:
        vertex_factory - used to construct the vertices of the new graph
        edge_factory - used to construct the edges of the new graph
        graph_factory - used to construct the new graph
    • Method Detail

      • collapseVertexPartitions

        public Graph<CV,CE> collapseVertexPartitions(VertexPartition<V,E> partitioning)
        Creates a new graph whose vertices correspond to the partitions of the supplied graph.
        Parameters:
        partitioning - a vertex partition of a graph
        Returns:
        a new graph whose vertices correspond to the partitions of the supplied graph
      • getSetToCollapsedVertexTransformer

        public com.google.common.base.Function<java.util.Set<V>,CV> getSetToCollapsedVertexTransformer()
        Returns:
        a Function from vertex sets in the original graph to collapsed vertices in the transformed graph.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.