You can read it for yourself, but it uses a 2d approach to do weighted selection in O(1) time with O(n) space. MAD THAT THIS WORKS. And it reminds me of something else, the last and BONUS randomness item I'll get into ...
-
-
Another exception is games, where you may want to generate content and play based on a small seed value, BUT UNDERSTAND THAT THIS IS NOT SECURE.
Show this thread -
Last tip: always measure your little random functions with a histogram or whatever. I still code these wrong and have to check. Thanks for reading!
Show this thread
End of conversation
New conversation -
-
-
Thanks! This is super useful and appreciated. :)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Consider using a Raspberry Pi as a HWRNG. You may then output /dev/random on a serial line and use it as a random feed into for instance a PC. The RPi could be physically installed in the PC's case.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Does std::random_device fall into this secure category?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.