Commits
David Young committed 90a602634e0
I've changed `test/dsets` so that every time it needs to visit all cells in a matrix in an arbitrary order, first it chooses a random starting `offset` in [0, rows * columns - 1]. Then it chooses a random `increment` that's relatively prime to `rows * columns`. Then it visits every cell in `rows * columns` steps: for (i = 0; i < rows * columns; i++) { visit(cell[offset / columns][offset % columns]); offset = (increment + offset) % (rows * columns); } By moving the HDrandom() calls outside of the main loop and visiting each cell only once, this probably speeds things up quite a bit. It's also more resilient to a crummy random sequence. The new code visits cells in an order that's probably arbitrary enough for testing purposes.