-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GetItems() extension for IRobustRandom (#4975)
* refactor: RobustRandom and RandomExtensions namespace change to file-scoped * refactor: IRobustRandom xml-doc methods rearranged to be more structured. * feat: GetItems methods added to RandomExtensions, tests for new methods added. * fix: GetItems will not request count-1 from next random, as System.Random.Next have upper bound excluded. * fix: enforced standard deviation on picking next items in RandomExtensions.GetItems + fixed hashet initial capacity +removed mandatory hashset allocation * refactor: specified border values interaction in IRobustRandom xml-doc * refactor: updated relese-notes * refactor: changed release-notes PROPERLY * fix: order by which unique random items are picked in RandomExtensions.GetItems were fixed to ACTUALLY follow normal distribution * refractor: added comment for devious RandomExtensions.GetItems only-unique logic * reduce code duplication * Cleanup code a bit Rename variables, and make it a bit more compact. Also, IMO the description is unnecessary * Remove obsolete extension * Remove incorrect O(n) comments. --------- Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
- Loading branch information
Showing
7 changed files
with
667 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.