org.apache.commons.graph.algorithm.spanning
Class MinimumSpanningForest

java.lang.Object
  extended byorg.apache.commons.graph.domain.basic.UndirectedGraphImpl
      extended byorg.apache.commons.graph.algorithm.spanning.MinimumSpanningForest
All Implemented Interfaces:
Graph, java.lang.reflect.InvocationHandler, MutableGraph, UndirectedGraph, WeightedGraph

public class MinimumSpanningForest
extends UndirectedGraphImpl
implements UndirectedGraph, WeightedGraph


Nested Class Summary
 class MinimumSpanningForest.WeightedEdgeComparator
           
 
Field Summary
private  java.util.Set chords
           
private  DDirectedGraph ddg
           
private  java.util.Map labels
           
private  org.apache.commons.collections.PriorityQueue queue
           
 
Fields inherited from class org.apache.commons.graph.domain.basic.UndirectedGraphImpl
 
Constructor Summary
MinimumSpanningForest(boolean isMin, WeightedGraph graph)
           
MinimumSpanningForest(WeightedGraph graph)
           
 
Method Summary
protected  void addEdge(WeightedGraph graph, Edge edge)
           
protected  void calculateMSF(boolean isMin, WeightedGraph graph)
           
protected  boolean connectsLabels(Graph graph, Edge e)
           
protected  Label findLabel(Vertex v)
           
 java.util.Set getChords()
           
 
Methods inherited from class org.apache.commons.graph.domain.basic.UndirectedGraphImpl
addEdge, addEdge, addVertex, connect, disconnect, getEdges, getEdges, getVertices, getVertices, getWeight, invoke, removeEdge, removeVertex, setWeight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.graph.Graph
getEdges, getEdges, getVertices, getVertices
 
Methods inherited from interface org.apache.commons.graph.WeightedGraph
getWeight
 

Field Detail

queue

private org.apache.commons.collections.PriorityQueue queue

labels

private java.util.Map labels

chords

private java.util.Set chords

ddg

private DDirectedGraph ddg
Constructor Detail

MinimumSpanningForest

public MinimumSpanningForest(WeightedGraph graph)

MinimumSpanningForest

public MinimumSpanningForest(boolean isMin,
                             WeightedGraph graph)
Method Detail

findLabel

protected Label findLabel(Vertex v)

connectsLabels

protected boolean connectsLabels(Graph graph,
                                 Edge e)

addEdge

protected void addEdge(WeightedGraph graph,
                       Edge edge)

calculateMSF

protected void calculateMSF(boolean isMin,
                            WeightedGraph graph)

getChords

public java.util.Set getChords()