libmir / mir-random

Advanced Random Number Generators
http://mir-random.libmir.org/
32 stars 15 forks source link

Error: no property randomSlice for type MersenneTwisterEngine #125

Closed tastyminerals closed 4 years ago

tastyminerals commented 4 years ago

Running the code below on Windows 10 with --compiler=ldc2

import mir.ndslice;
import mir.random : threadLocalPtr, Random;
import mir.random.variable : normalVar;

void main() {

    auto sample = threadLocalPtr!Random.randomSlice(normalVar, 15);
}

throws the following exception:

Error: no property randomSlice for type mir.random.engine.mersenne_twister.MersenneTwisterEngine!(ulong, 64LU, 312LU, 156LU, 31LU, 13043109905998158313LU, 29LU, 6148914691236517205LU, 17LU, 8202884508482404352LU, 37LU, 18444473444759240704LU, 43LU, 6364136223846793005LU)*

dub.json

"dependencies": {
    "mir-algorithm": "~>3.7.18",
    "mir-random": "~>2.2.11"
},
9il commented 4 years ago

import mir.random.algorithm; is required. http://docs.random.dlang.io/latest/mir_random_algorithm.html