random_ex

Generate Randomized Instances.

Members

Aliases

randomize
alias randomize = randInPlace
Undocumented in source.
randomized
alias randomized = randomInstanceOf
Undocumented in source.

Functions

randInPlace
auto ref randInPlace(E x)

Randomize Contents of x.

randInPlace
auto ref randInPlace(E x, E low, E high)

Randomize Contents of x, optionally in range [low, high].

randInPlace
auto ref randInPlace(E x, E low, E high)

Randomize Contents of x, optional in range [low, high].

randInPlace
auto ref randInPlace(Rational!E x)

Randomize Contents of x.

randInPlace
auto ref randInPlace(dchar x)

Generate Random Contents of x. See also: http://forum.dlang.org/thread/emlgflxpgecxsqweauhc@forum.dlang.org

randInPlace
auto ref randInPlace(dstring x)

Randomize Contents of x.

randInPlace
auto ref randInPlace(R x)

Randomize Contents of x.

randInPlace
auto ref randInPlace(T x)

Randomize Contents of x.

randInPlace
auto ref randInPlace(T x)

Randomize Contents of members of x.

randInPlace
auto ref randInPlace(T x)

Randomize Contents of members of x.

randInPlaceBlockwise
auto ref randInPlaceBlockwise(A x)

Blockwise Randomize Contents of x of Array Type A. Randomizes in array blocks of type B.

randomInstanceOf
T randomInstanceOf()

Get New Randomized Instance of Type T.

randomInstanceOf
T randomInstanceOf(T low, T high)

Get New Randomized Instance of Type T.

Meta

Authors

See also: http://forum.dlang.org/thread/byonwfghdqgcirdjyboh@forum.dlang.org

TODO Can these be tagged with @nogc? Currently std.random.uniform may allocate. TODO Tags as nothrow when std.random gets there. TODO How to handle possibly null reference (class, dynamic types) types? Answer relates to how to randomize empty/null variable length structures (arrays, strings, etc). - Maybe some kind of length randomization?