Random specific in julia

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

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

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.

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

4 Likes