edu.uci.ics.jung.algorithms.blockmodel
Class BipartiteGraphCollapser
java.lang.Object
edu.uci.ics.jung.algorithms.blockmodel.GraphCollapser
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
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 |
BipartiteGraphCollapser
public BipartiteGraphCollapser()
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 addedsuperVertex
- 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 edgerelevantEdges
- 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 graphrootSet
- 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)