17 #ifndef n_aryGrayCodeCounter_H 18 #define n_aryGrayCodeCounter_H 97 int next(
int& changed_index);
106 int next(
int& changed_index,
int& value_prev,
int& value);
108 int64_t
advance(
int counter_pos);
GrayCode gray_code
the current gray code associated to the offset value
int64_t offset_max
the maximal offset in the counter offset = prod( n_ary_limits[i] )
n_aryGrayCodeCounter()
Default constructor of the class.
int64_t offset
the current offset in the counter 0<= offset <= offset_max
Header file for Grey code container.
int64_t advance(int counter_pos)
Advance the n-ary Gray code counter by incrementing the digit at a specified position.
Copyright 2021 Budapest Quantum Computing Group.
void set_offset_max(const int64_t &value)
int next()
Iterate the counter to the next value.
void initialize()
Initialize the gray counter by zero offset.
matrix_base< int > n_ary_limits
The maximal value of the individual gray code elements.
matrix_base< int > counter_chain
The incremental counter chain associated to the gray code.