norvig-sudoku
norvig-sudoku copied to clipboard
Prevent repeating entries in _neighbors and explain how units and peers are encoded
I landed on this repo via Peter Norvig's webpage. Some of the terminology used on his page is different than in your implementation. The comments make it easier to understand the contents of the vectors that store the units of a box - _group
- and the positions of the units in that vector for a given box - _group_of
. _neighbors
contextually refers to peers
.
Moreover, _neighbors
contained unnecessary repeating entries in the implementation. Now, _neighbors
resembles the set of peers.