CkPttn 1.2.4
Loading...
Searching...
No Matches
Classes | Functions
vertex.hpp File Reference

Bitstring vertex representation for middle-levels Gray code. More...

#include <iostream>
#include <vector>
Include dependency graph for vertex.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MidVertex
 Bitstring vertex for middle-levels Gray code algorithm. More...
 

Functions

bool operator== (const MidVertex &lhs, const MidVertex &rhs)
 Equality comparison for MidVertex.
 
bool operator!= (const MidVertex &lhs, const MidVertex &rhs)
 Inequality comparison for MidVertex.
 
std::ostream & operator<< (std::ostream &os, const MidVertex &v)
 Stream output operator for MidVertex.
 
bool bitstrings_less_than (const int *x, const int *y, int length)
 Lexicographic comparison of bitstrings.
 
bool bitstrings_equal (const int *x, const int *y, int length)
 Equality comparison of bitstrings.
 

Detailed Description

Bitstring vertex representation for middle-levels Gray code.

Adapted from: Torsten Muetze, Jerri Nummenpalo (2018) Middle levels Gray code algorithm, adapted for MSVC/ckpttn-cpp.

Original license: GPL v2+

Function Documentation

◆ bitstrings_equal()

bool bitstrings_equal ( const int *  x,
const int *  y,
int  length 
)

Equality comparison of bitstrings.

◆ bitstrings_less_than()

bool bitstrings_less_than ( const int *  x,
const int *  y,
int  length 
)

Lexicographic comparison of bitstrings.

◆ operator!=()

bool operator!= ( const MidVertex lhs,
const MidVertex rhs 
)
inline

Inequality comparison for MidVertex.

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const MidVertex v 
)

Stream output operator for MidVertex.

◆ operator==()

bool operator== ( const MidVertex lhs,
const MidVertex rhs 
)
inline

Equality comparison for MidVertex.