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);
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.
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.