Random interface#3957
Conversation
|
Would this be used as a base for |
I gave it a try already and I can make it a base to |
Can we go ahead and break the current behavior? Since it doesn't seem to be widely used as of now and having this new interface would allow to go head and replace all old and bad practices of random number generation. |
a37a057 to
bd81f2c
Compare
Behavior breakage is for a different PR. Right not I'm just trying to hot-swap a couple of instances to validate how potentially useful this class is. |
taketwo
left a comment
There was a problem hiding this comment.
Just throwing in a few naming ideas, feel free to disregard:
- use
Mixininstead ofBase
addRandomto the names of methods, e.g. (setRandomSeed,resetRandomEngine)
The second one is because terms like "seed" and "engine" are overloaded. In our CV context, the former may also mean a starting point in e.g. floodfill segmentation. And in computing in general, the latter may mean different things. (Imagine resetEngine() popping up in an auto-completion list for some PCL class, may look confusing).
| } | ||
|
|
||
| protected: | ||
| SeedT seed_; |
There was a problem hiding this comment.
Are we sure about making this protected and not private?
|
Marking this as stale due to 30 days of inactivity. Commenting or adding a new commit to the pull request will revert this. |
An implementation of the discussion in #3724.
Opening up for comments.
Closes #3724.