template<typename IndexType = Point>
class simox::iterator::XYIndexRangeIterator< IndexType >
The XYIndexRangeIterator class.
The aim of this class is to provide a convenient way to iterate over 2D arrays This class provides a 2D iterator that returns all indices to the 2D array, e.g.
My2DArray arr(10, 20); for(auto [x,y] : XYIndexRangeIterator(arr)){ auto val = arr.at(x,y); // do the magic }
This is hightly inspired by cartographer::mapping::XYIndexRangeIterator see: https://github.com/cartographer-project/cartographer/blob/master/cartographer/mapping/2d/xy_index.h