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

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MidVertex()

MidVertex::MidVertex ( const std::vector< int > &  x)
explicit

Construct a MidVertex from a bitstring vector.

Parameters
[in]xThe input bitstring

Member Function Documentation

◆ compute_flip_seq_0()

void MidVertex::compute_flip_seq_0 ( std::vector< int > &  seq,
bool  flip 
)

◆ compute_flip_seq_1()

void MidVertex::compute_flip_seq_1 ( std::vector< int > &  seq) const

◆ get_bits()

const std::vector< int > & MidVertex::get_bits ( ) const
inline

◆ is_first_vertex()

bool MidVertex::is_first_vertex ( ) const

◆ is_last_vertex()

bool MidVertex::is_last_vertex ( ) const

◆ operator[]() [1/2]

int & MidVertex::operator[] ( int  i)
inline

◆ operator[]() [2/2]

const int & MidVertex::operator[] ( int  i) const
inline

◆ rev_inv()

void MidVertex::rev_inv ( )

◆ size() [1/2]

int MidVertex::size ( )
inline

◆ size() [2/2]

int MidVertex::size ( ) const
inline

◆ to_first_vertex()

int MidVertex::to_first_vertex ( )

◆ to_last_vertex()

int MidVertex::to_last_vertex ( )

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