Interface HamiltonianCycleAlgorithm

All Known Implementing Classes:
PalmerHamiltonianCycle

public interface HamiltonianCycleAlgorithm
A Hamiltonian (or spanning) cycle is a cycle that contains all vertices of the graph.
Author:
Cristian Frăsinaru
See Also:
  • Method Details

    • findCycle

      Cycle findCycle()
      Returns:
      an Hamiltonian cycle, or null if the graph does not contain one or the algorithm is unable to find it.
    • getInstance

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