CkPttn 1.2.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
MidHamCycle Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MidHamCycle()

MidHamCycle::MidHamCycle ( const MidVertex x,
long long  limit,
MidVisitFunc  visit_f 
)
explicit

Construct a MidHamCycle with given vertex, limit, and visit callback.

Parameters
[in]xThe starting vertex
[in]limitMaximum number of steps
[in]visit_fCallback invoked for each visited vertex

Member Function Documentation

◆ get_length()

long long MidHamCycle::get_length ( ) const
inline

Get the length of the Hamiltonian cycle.


The documentation for this class was generated from the following file: