Package org.graph4j.spanning
Class MinimumSpanningTreeIterator
java.lang.Object
org.graph4j.spanning.WeightedSpanningTreeIterator
org.graph4j.spanning.MinimumSpanningTreeIterator
- All Implemented Interfaces:
Iterator<Collection<Edge>>
Iterates over the minimum spanning trees of a weighted graph.
The iterator returns the collection of edges of a spanning tree, which can be
used to create the actual tree with the method
Graph.subgraph(java.util.Collection).- Author:
- Cristian Frăsinaru
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.graph4j.spanning.WeightedSpanningTreeIterator
WeightedSpanningTreeIterator.Part -
Field Summary
Fields inherited from class org.graph4j.spanning.WeightedSpanningTreeIterator
edges, graph, numVertices, queue -
Constructor Summary
ConstructorsConstructorDescriptionMinimumSpanningTreeIterator(Graph graph) Creates an iterator over the minimum spanning trees of a weighted graph. -
Method Summary
Methods inherited from class org.graph4j.spanning.WeightedSpanningTreeIterator
next, refineMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
MinimumSpanningTreeIterator
Creates an iterator over the minimum spanning trees of a weighted graph.- Parameters:
graph- the input graph.
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<Collection<Edge>>- Overrides:
hasNextin classWeightedSpanningTreeIterator
-