The OpenD Programming Language

randArray

Convenience function to allow one-statement creation of arrays of random numbers.

  1. auto randArray(size_t N, Args args)
    randArray
    (
    alias randFun
    Args...
    )
    (
    size_t N
    ,
    auto ref Args args
    )
  2. R[] randArray(size_t N, Args args)

Examples

// Create an array of 10 random numbers distributed Normal(0, 1).
auto normals = randArray!rNormal(10, 0, 1);

Meta