9#ifndef CKPTTN_MIDLEVEL_HAMCYCLE_HPP
10#define CKPTTN_MIDLEVEL_HAMCYCLE_HPP
18using MidVisitFunc = std::function<void(
const std::vector<int>& y,
int i)>;
46 bool flip_seq(
const std::vector<int>& seq,
int& dist_to_start,
bool final_path);
Hamiltonian cycle generation for middle-levels Gray code.
Definition hamcycle.hpp:27
long long get_length() const
Get the length of the Hamiltonian cycle.
Definition hamcycle.hpp:37
MidHamCycle(const MidVertex &x, long long limit, MidVisitFunc visit_f)
Construct a MidHamCycle with given vertex, limit, and visit callback.
Bitstring vertex for middle-levels Gray code algorithm.
Definition vertex.hpp:24
std::function< void(const std::vector< int > &y, int i)> MidVisitFunc
Callback function type for visiting vertices during Hamiltonian cycle traversal.
Definition hamcycle.hpp:18
Bitstring vertex representation for middle-levels Gray code.