3 ms·
Does anyone have an example for when you'd want to use this algorithm?
by yissp 6y ago
Does anyone have an example for when you'd want to use this algorithm?
- sreekotay 6y agoIncremental buffer copy?
- BeeOnRope 6y agoSometimes you'd like to visit all elements of some logical array in a random order, with each element pointing to the next, e.g., to benchmark the speed of pointer chasing. Using Sattolo, you can set up such a full-sized linked list fairly simply, e.g.: https://github.com/travisdowns/MemoryLanes/blob/b6cd7d2ceaa0fc36bd02ddb15544792c4c616973/consoleversion/testingmlp.cpp#L110 https://github.com/travisdowns/MemoryLanes/blob/b6cd7d2ceaa0... I have used it a half dozen times in more or less that specific context.
- cjg 6y agoRandom ordering of elements in a list is often used in maze generation. It's possible that a permutation that had only one cycle might produce a maze with a particular structure.