Package org.graph4j.hamiltonian
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 Summary
-
Method Details
-
findCycle
Cycle findCycle()- Returns:
- an Hamiltonian cycle, or
nullif the graph does not contain one or the algorithm is unable to find it.
-
getInstance
- Parameters:
graph- the input graph.- Returns:
- the default implementation of the algorithm.
-