File tree 2 files changed +4
-2
lines changed 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1762,7 +1762,7 @@ module Make
1762
1762
if dups then sample else
1763
1763
let prev = Hashtbl. create max_size in
1764
1764
let rec sample_new steps =
1765
- if steps = 0 then invalid_arg " sample_array " else
1765
+ if steps = 0 then sample () else
1766
1766
let s = sample () in
1767
1767
try Hashtbl. find prev s ; sample_new (steps - 1 )
1768
1768
with Not_found -> Hashtbl. add prev s () ; s in
Original file line number Diff line number Diff line change @@ -466,7 +466,9 @@ module type S = sig
466
466
sorted.
467
467
468
468
If [~dups:false] ([true] by default), all elements of generated
469
- array are unique.*)
469
+ arrays are unique, or at least try hard to be in a reasonable time:
470
+ if the codomain of [sampler] is too small there might still be
471
+ duplicates.*)
470
472
val sample_array :
471
473
?min_size : int -> ?max_size : int -> ?dups : bool -> ?sorted : bool
472
474
-> 'a sampler
You can’t perform that action at this time.
0 commit comments