Interface EulerianCircuitAlgorithm

All Known Implementing Classes:
EulerianCircuitAlgorithmBase, HierholzerEulerianCircuit

public interface EulerianCircuitAlgorithm
An Eulerian circuit is an Eulerian trail (a trail that contains all the edges of the graph) that has its endpoints connected. A connected graph is Eulerian if and only if the degree of each vertex is even. A connected digraph is Eulerian if and only if the in-degree of each vertex equals the out-degree of each vertex.
Author:
Cristian Frăsinaru
See Also:
  • Method Details

    • findCircuit

      Circuit findCircuit()
      Returns:
      an Eulerian circuit, or null if the graph is not Eulerian.
    • isEulerian

      boolean isEulerian()
      Returns:
      true if the graph is Eulerian
    • getInstance

      static EulerianCircuitAlgorithm getInstance(Graph graph)
      Returns the default implementation of the algorithm.
      Parameters:
      graph - the input graph.
      Returns:
      the default implementation of the algorithm.