Interface DirectedSimpleCycles<V,E>

Type Parameters:
V - the vertex type.
E - the edge type.
All Known Implementing Classes:
HawickJamesSimpleCycles, JohnsonSimpleCycles, SzwarcfiterLauerSimpleCycles, TarjanSimpleCycles, TiernanSimpleCycles

public interface DirectedSimpleCycles<V,E>
A common interface for classes implementing algorithms for enumeration of the simple cycles of a directed graph.
Author:
Nikolay Ognyanov
  • Method Summary

    Modifier and Type
    Method
    Description
    default List<List<V>>
    Find the simple cycles of the graph.
    void
    Find the simple cycles of the graph.
  • Method Details

    • findSimpleCycles

      default List<List<V>> findSimpleCycles()
      Find the simple cycles of the graph.
      Returns:
      The list of all simple cycles. Possibly empty but never null.
    • findSimpleCycles

      void findSimpleCycles(Consumer<List<V>> consumer)
      Find the simple cycles of the graph.
      Parameters:
      consumer - Consumer that will be called with each cycle found.