Thread overview | |||||
---|---|---|---|---|---|
|
June 28, 2012 [Issue 8314] New: randomSample primes with constant | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=8314 Summary: randomSample primes with constant Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: dawg@dawgfoto.de --- Comment #0 from dawg@dawgfoto.de 2012-06-27 23:35:08 PDT --- import std.random, std.range, std.stdio; void main() { foreach (_; 0 .. 100) { immutable seed = unpredictableSeed(); writeln(seed, " => ", randomSample(iota(100), 1, Random(seed)).front); } } -------- The random generator is assigned to the Range only after it was primed and the default constructed random generator always returns the same first value. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 23, 2012 [Issue 8314] randomSample primes with constant | ||||
---|---|---|---|---|
| ||||
Posted in reply to dawg@dawgfoto.de | http://d.puremagic.com/issues/show_bug.cgi?id=8314 --- Comment #1 from github-bugzilla@puremagic.com 2012-07-22 19:50:32 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/aa896e08ccbdb3deee98658f09022bdb4c5dc503 set random generator in constructor - Bug 8314 was already fixed by adding a _first flag https://github.com/D-Programming-Language/phobos/commit/92335506d309d4f06e1757b149c5069d02ac1174 Merge pull request #654 from dawgfoto/fix8314 fix issue 8314 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 05, 2013 [Issue 8314] randomSample primes with constant | ||||
---|---|---|---|---|
| ||||
Posted in reply to dawg@dawgfoto.de | http://d.puremagic.com/issues/show_bug.cgi?id=8314 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich@gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation