|
CkPttn 1.2.4
|
Bitstring vertex for middle-levels Gray code algorithm. More...
#include <vertex.hpp>
Public Member Functions | |
| MidVertex (const std::vector< int > &x) | |
| Construct a MidVertex from a bitstring vector. | |
| const std::vector< int > & | get_bits () const |
| int & | operator[] (int i) |
| const int & | operator[] (int i) const |
| int | size () |
| int | size () const |
| void | rev_inv () |
| bool | is_first_vertex () const |
| bool | is_last_vertex () const |
| int | to_first_vertex () |
| int | to_last_vertex () |
| void | compute_flip_seq_0 (std::vector< int > &seq, bool flip) |
| void | compute_flip_seq_1 (std::vector< int > &seq) const |
Bitstring vertex for middle-levels Gray code algorithm.
Represents a vertex in the middle-levels graph as a bitstring. Provides methods for flip sequence computation, vertex comparison, and conversion operations used in Hamiltonian cycle generation.
|
explicit |
Construct a MidVertex from a bitstring vector.
| [in] | x | The input bitstring |
| void MidVertex::compute_flip_seq_0 | ( | std::vector< int > & | seq, |
| bool | flip | ||
| ) |
| void MidVertex::compute_flip_seq_1 | ( | std::vector< int > & | seq | ) | const |
|
inline |
| bool MidVertex::is_first_vertex | ( | ) | const |
| bool MidVertex::is_last_vertex | ( | ) | const |
|
inline |
|
inline |
| void MidVertex::rev_inv | ( | ) |
|
inline |
|
inline |
| int MidVertex::to_first_vertex | ( | ) |
| int MidVertex::to_last_vertex | ( | ) |