edu.uci.ics.jung.algorithms.blockmodel
Class BipartiteGraphCollapser

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.blockmodel.GraphCollapser
      extended by edu.uci.ics.jung.algorithms.blockmodel.BipartiteGraphCollapser

public class BipartiteGraphCollapser
extends GraphCollapser

A variant of the GraphCollapser that overrides two minor functions and defines CollapsedBipartiteEdge and CollapsedBipartiteVertex. This models the basic procedure for tweaking the GraphCollapser to your own (nefarious) purposes. created Feb 8, 2004

Author:
danyelf

Nested Class Summary
 class BipartiteGraphCollapser.CollapsedBipartiteEdge
           
 class BipartiteGraphCollapser.CollapsedBipartiteVertex
           
 
Nested classes/interfaces inherited from class edu.uci.ics.jung.algorithms.blockmodel.GraphCollapser
GraphCollapser.CollapsedEdge, GraphCollapser.CollapsedSparseVertex, GraphCollapser.CollapsedVertex, GraphCollapser.DirectedCollapsedEdge, GraphCollapser.UndirectedCollapsedEdge
 
Field Summary
 
Fields inherited from class edu.uci.ics.jung.algorithms.blockmodel.GraphCollapser
instance
 
Constructor Summary
BipartiteGraphCollapser()
           
 
Method Summary
protected  GraphCollapser.CollapsedVertex createCollapsedVertex(Graph g, Set rootSet)
          It must be the case that all members of rootSet are in the same partition.
protected  void createUndirectedEdge(Graph g, GraphCollapser.CollapsedVertex superVertex, Vertex opposite, Set relevantEdges)
          Overridable method to create a single undirected edge that represents the data in its parameters.
 
Methods inherited from class edu.uci.ics.jung.algorithms.blockmodel.GraphCollapser
annotateEdge, annotateVertex, collapseVerticesIntoSuperVertices, createDirectedEdges, createEdgesCorrespondingToMap, findEdgesAndVerticesConnectedToRootSet, getCollapsedGraph, getCollapsedGraph, getInstance, replaceEquivalencesWithCollapsedVertices, replaceWith, shouldAddEdge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BipartiteGraphCollapser

public BipartiteGraphCollapser()
Method Detail

createUndirectedEdge

protected void createUndirectedEdge(Graph g,
                                    GraphCollapser.CollapsedVertex superVertex,
                                    Vertex opposite,
                                    Set relevantEdges)
Description copied from class: GraphCollapser
Overridable method to create a single undirected edge that represents the data in its parameters. Should call annotateEdge with the new edge.

Overrides:
createUndirectedEdge in class GraphCollapser
Parameters:
g - The graph in which this edge should be added
superVertex - The vertex at the near end of this edge. (For an undirecte graph, it doesn't really matter).
opposite - The vertex at the far end of this edge
relevantEdges - The set of edges that this edge is meant to represent.
See Also:
edu.uci.ics.jung.graph.algorithms.blockmodel.GraphCollapser#addUndirectedEdge(edu.uci.ics.jung.graph.Graph, edu.uci.ics.jung.graph.Vertex, edu.uci.ics.jung.graph.Vertex, java.util.Set)

createCollapsedVertex

protected GraphCollapser.CollapsedVertex createCollapsedVertex(Graph g,
                                                               Set rootSet)
It must be the case that all members of rootSet are in the same partition.

Overrides:
createCollapsedVertex in class GraphCollapser
Parameters:
g - The input graph
rootSet - The set of vertices which should be represented by the new vertex.
Returns:
a new CollapsedVertex
See Also:
edu.uci.ics.jung.graph.algorithms.blockmodel.GraphCollapser#getCollapsedVertex(edu.uci.ics.jung.graph.Graph, java.util.Set)