Random specific in julia


#1

Is there a function in Julia that can generate a random integer in the range and without repeats?


#2

Have you checked ?randperm or ?shuffle? Do they work for you?


#3

I’m not sure what you mean by “in the range” but rand(1:10) gives you an integer between (and including) 1 and 10.


#4

Sampling without replacement is probably what you are looking for. http://juliastats.github.io/StatsBase.jl/stable/sampling.html#Sampling-from-Population-1