|
CkPttn 1.2.4
|
Hamiltonian cycle generation for middle-levels Gray code. More...
#include <hamcycle.hpp>
Public Member Functions | |
| MidHamCycle (const MidVertex &x, long long limit, MidVisitFunc visit_f) | |
| Construct a MidHamCycle with given vertex, limit, and visit callback. | |
| long long | get_length () const |
| Get the length of the Hamiltonian cycle. | |
Hamiltonian cycle generation for middle-levels Gray code.
Uses tree-based flip sequences to generate a Hamiltonian cycle through the middle-levels graph. Supports an optional visit callback and iteration limit for partial traversal.
|
explicit |
Construct a MidHamCycle with given vertex, limit, and visit callback.
| [in] | x | The starting vertex |
| [in] | limit | Maximum number of steps |
| [in] | visit_f | Callback invoked for each visited vertex |
|
inline |
Get the length of the Hamiltonian cycle.