On Friday, 26 February 2016 at 23:05:00 UTC, John Colvin wrote:
This was what I was trying to get at in my initial post, but I failed to get the idea across properly.

Yea. It didn't even click with me at first, because when I first read Andrei's email I jumped straight in my head to the thought, "OK, so what _is_ an appropriate algorithm for lazily calculating a random permutation using O(1) storage space?"

The good news is that, AFAICS, that is a readily solvable problem. It's inevitably more computationally complex than an in-place random shuffle -- O(n log n) instead of O(n) -- but algorithms do exist that could be adapted for Phobos.

Reply via email to