xowiki::randomized_indices (public)

 xowiki::randomized_indices [ -seed seed ] length

Defined in packages/xowiki/tcl/xowiki-utility-procs.tcl

Produce a list of "length" random numbers between 0 and length-1. Measure quality of randomization:

      time {lappend _ [xowiki::randomized_indices -seed [clock microseconds] 3]} 1000
      foreach t $_ {
        lassign $t a b c; dict incr stats "a $a"; dict incr stats "b $b"; dict incr stats "c $c"
      }
      set stats
    

Switches:
-seed (optional)
Parameters:
length (required)

Testcases:
api_randomized
[ show source ]
Show another procedure: