Interface SpanningTreeAlgorithm.SpanningTree<E>

Type Parameters:
E - the graph edge type
All Superinterfaces:
java.lang.Iterable<E>
All Known Subinterfaces:
CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTree<V,​E>
All Known Implementing Classes:
CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTreeImpl, SpanningTreeAlgorithm.SpanningTreeImpl
Enclosing interface:
SpanningTreeAlgorithm<E>

public static interface SpanningTreeAlgorithm.SpanningTree<E>
extends java.lang.Iterable<E>
A spanning tree.
  • Method Summary

    Modifier and Type Method Description
    java.util.Set<E> getEdges()
    Set of edges of the spanning tree.
    double getWeight()
    Returns the weight of the spanning tree.
    default java.util.Iterator<E> iterator()
    Returns an iterator over the edges in the spanning tree.

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Method Details

    • getWeight

      double getWeight()
      Returns the weight of the spanning tree.
      Returns:
      weight of the spanning tree
    • getEdges

      java.util.Set<E> getEdges()
      Set of edges of the spanning tree.
      Returns:
      edge set of the spanning tree
    • iterator

      default java.util.Iterator<E> iterator()
      Returns an iterator over the edges in the spanning tree.
      Specified by:
      iterator in interface java.lang.Iterable<E>
      Returns:
      iterator over the edges in the spanning tree.