Dicebot
73f773838d
import std.typetuple -> import std.meta
2015-05-05 22:22:10 +03:00
Jan
76326acc32
Fixed saying $(RPAREN) in std.random documentation
2015-04-18 16:05:07 +02:00
Basile Burg
fa0715e588
Update random.d
2015-04-04 12:24:17 +02:00
Brad Anderson
641aa4ee42
Missing Ddoc parenthesis in std.random docs
2015-03-31 15:40:50 -06:00
Brad Anderson
5114f1d0e0
Minor std.random documentation fixes
2015-03-29 22:29:29 -06:00
monarch dodra
2679e44773
Merge pull request #2969 from e10s/patch-8
...
Fix Issue 13649 - uniform01 Assertion failure
2015-03-12 12:25:20 +01:00
Ilya Yaroshenko
767e8d164b
fix docs
2015-02-20 10:57:43 +03:00
e10s
c561951994
Fix Issue 13649 - uniform01 Assertion failure
2015-02-15 01:27:48 +09:00
k-hara
a40422b2aa
Add missing imports
2015-01-07 00:18:56 +09:00
Joseph Rushton Wakeling
a1a76ceebd
Add Params/Returns ddoc to free functions in std.random
...
The existing docs have not been tweaked in any way, so the new additions
result in some duplication of information. This seems a better first
step than a more major revision.
Documentation for struct methods has been left unchanged, and will be
addressed in a later patch.
I've also left the documentation for uniformDistribution unchanged as
IMHO this function is so broken in its design, it really ought to be
deprecated and removed :-)
2015-01-06 00:20:16 +01:00
sinkuu
7eab0ffa0a
Remove redundant initialization
2014-12-06 18:13:58 +09:00
sinkuu
2e5bb50531
Fix issue 12589 - std.random.randomCover fails for empty ranges
2014-12-06 17:51:26 +09:00
H. S. Teoh
64d5a3a806
Merge pull request #2777 from WalterBright/upgrade
...
add upgrade hints
2014-11-30 19:24:48 -08:00
Walter Bright
21221cf34a
add upgrade hints
2014-11-30 18:51:02 -08:00
Rainer Schuetze
7c2f962b10
make nested foreach over TypeTuple bodies into lambdas to avoid huge functions
2014-11-28 17:15:37 +01:00
Ilya Yaroshenko
2c744b54e1
std.range: constraints => primitives
...
See discussion and voting in #2661
2014-11-23 20:05:20 +03:00
H. S. Teoh
97c2f565bc
Merge pull request #2754 from 9il/random
...
std.random: update imports
2014-11-21 14:41:04 -08:00
Ilya Yaroshenko
ef94b26162
std.random: update imports
2014-11-21 00:18:06 +03:00
Lars T. Kyllingstad
96583fe46b
isNaN() is not a property
...
...so it shouldn't be used as one.
2014-11-20 20:22:00 +01:00
Andrei Alexandrescu
68beb7c515
Merge pull request #2613 from braddr/safe
...
mark most of std.algorithm's unit tests as @safe
2014-10-19 10:29:32 -07:00
Martin Nowak
c855945f46
Merge pull request #2614 from Geod24/fix-license-doc
...
[DDOC] Usage of WEB macro for License everywhere
2014-10-17 00:16:49 +02:00
Geod24
0fb95b8c27
Usage of WEB macro for License everywhere
2014-10-15 11:30:42 +02:00
Joakim
093d636de4
Deprecate std.c.* and move all remaining declarations to core.stdc.*
2014-10-14 09:26:21 -05:00
Brad Roberts
4e66cda63c
uniform should be @safe
2014-10-13 00:09:18 -07:00
Brad Roberts
f70e1e41e4
Fix unpredictableSeed so that rndstuff can be used in @safe code
...
Allows:
1) canFind's tests to be @safe
2) allows the remainder of find's tests to be @safe
2014-10-13 00:04:37 -07:00
H. S. Teoh
4a6890fc40
Preemptive fix of other places where .sort is used
2014-09-28 08:04:52 -07:00
Tero Hänninen
2743f9b8fe
Simplify partialShuffle
2014-08-15 21:54:03 +03:00
H. S. Teoh
3e02fb7772
Fix missing $(RPAREN) in ddoc for std.random.uniform01.
2014-08-08 15:43:30 -07:00
Joseph Rushton Wakeling
88d86ecda0
Fix Issue #12835 : open lower bound for integral-type uniform()
...
Added a cast to ensure the setting of lower bound can handle character
types and integral types smaller than int. The additional unittests
should prevent such issues from arising again.
2014-07-11 23:10:18 +02:00
AndrewEdwards
7295c7196d
Update random.d
...
Fix Ddoc: Stray ")" warning.
2014-06-29 17:13:15 +09:00
Joseph Rushton Wakeling
cb5ee35ad6
Fix Issue #12877 : allow uniform() to handle dchar variates
...
Since [dchar.min, dchar.max] does not cover the full bit range of dchar,
optimizations that work for other integral types will fail here, and
result in illegal unicode points being generated.
This fix avoids breaking any existing calls to uniform() via a twofold
approach:
* uniform!"[]"(T.min, T.max) will only call uniform!ResultType if
T is not a dchar;
* uniform!dchar will not try and use the entire bit range but will
instead call uniform!"[]"(dchar.min, dchar.max).
Unittests have been added that should prevent such issues from arising
again.
2014-06-08 18:58:13 +02:00
monarch dodra
abcf061a93
Merge pull request #2051 from tom-tan/safe-pure-nothrow-std-random-generators
...
Mark methods for random number generators in std.random as safe pure not...
2014-04-05 23:32:46 +02:00
Tomoya Tanjo
e520962982
Mark LinearCongruentialEngine.front and XorshiftEngine.front as const
2014-04-04 11:34:37 +09:00
Joseph Rushton Wakeling
93fe844b72
Small optimization to uniform01
...
Only need to chech u < 1 if RNG returns non-integral variates.
2014-03-27 21:18:40 +01:00
Tomoya Tanjo
412ec99bea
Mark methods for random number generators in std.random as safe pure nothrow
2014-03-26 20:19:11 +09:00
Joseph Rushton Wakeling
d0727dc7a0
Fix Issue #5240 : faster std.random.uniform for [0.0, 1.0) range
...
Following typical design in other languages, the function is named
uniform01. It can be templated on floating-point type, defaulting
to double if none is specified.
The implementation is pretty much derived from its counterpart in
Boost.Random, in particular in its taking account of the different
requirements for integral versus floating-point RNG values, and in
checking that the generated variate is less than 1 before returning.
This last check is necessary simply because we can't guarantee, in
the case of a floating-point based RNG, that we will not get a
result exactly equal to 1.
Fixes http://d.puremagic.com/issues/show_bug.cgi?id=5240
2014-03-25 21:09:41 +01:00
Marc Schütz
90262dcffc
Remove another use of the comma operator
2014-03-23 15:51:31 +01:00
Daniel Murphy
4d0892baba
Remove uses of the comma operator
2014-02-18 00:48:40 +11:00
Peter Alexander
26eecf4651
Fix Issue 4417 - isUniformRNG constraints for std.random.uniform
...
https://d.puremagic.com/issues/show_bug.cgi?id=4417
2014-02-15 20:55:56 +00:00
Andrej Mitrovic
749143754a
Add uniform example for enums.
2014-02-13 08:18:54 +01:00
k-hara
b391b2ec9f
Convert to new alias syntax
2014-02-11 15:27:05 +09:00
Dmitry Olshansky
71f9550eac
Merge pull request #1874 from monarchdodra/11960
...
Fix Issue 11960 - Phobos Mersenne Random Engine not supporting unsigned longs
2014-01-30 11:45:23 -08:00
monarch dodra
fc5ff02eb9
Add an MT unittest
2014-01-22 16:42:49 +01:00
monarch dodra
06e9874060
Fix Issue 11960 - Phobos Mersenne Random Engin...
...
...e not supporting unsigned longs
2014-01-22 15:11:43 +01:00
monarch dodra
edaad18d00
Document the rest of the parameters
2014-01-22 15:10:04 +01:00
monarch dodra
ffcae1609d
Add extra asserts on "w"
2014-01-22 15:08:50 +01:00
monarch dodra
cba9da3835
Move static asserts
...
So they trigger before they create a compile error
2014-01-22 14:56:12 +01:00
monarch dodra
f680ea030f
MT alignement
2014-01-22 14:55:13 +01:00
Daniel Murphy
a656f26e9e
Remove use of automatic adjacent string literal concatenation from phobos
2014-01-20 03:42:21 +11:00
monarch dodra
fc48d56284
Merge pull request #1717 from Zshazz/issue_11598
...
Fix issue 11598 - uniform could be faster for integrals
2013-12-16 05:24:20 -08:00