Class SpanningTreeIterator

java.lang.Object
org.graph4j.spanning.SpanningTreeIterator
All Implemented Interfaces:
Iterator<Collection<Edge>>

public class SpanningTreeIterator extends Object implements Iterator<Collection<Edge>>
Iterates over all spanning trees of a 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). This iterator should be used when the spanning trees are required without taking into account the weight of the edges. If the spanning trees are supposed to be returned in order by their weight, see WeightedSpanningTreeIterator.
Author:
Cristian Frăsinaru
See Also:
  • Constructor Details

    • SpanningTreeIterator

      public SpanningTreeIterator(Graph graph)
      Creates an iterator over the spanning trees of a graph.
      Parameters:
      graph - the input graph.
  • Method Details