>>  <<  Ndx  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  wd  Help  User

random: various random number utilities

Name Type Description
deal verb deal x items from y (no repetition)
dealx verb deal x indices from shape y (no repetition)
randomize verb sets a random value into random link
rand01 verb generate y random numbers in interval (0,1)
rand11 verb generate y random numbers in interval (_1,1)
setrl verb set random link
toss verb pick x items from y (with repetition)
tossx verb pick x indices from shape y (with repetition)

tossx

pick x indices from shape y (with repetition)

note: y for deal is data
      y for dealx is $data

similarly for toss and tossx

---------------------------------------------------------
examples:

   p=: ;: 'anne dave mary tom'
   words=: ;: inverse

   words deal p
mary anne dave tom

   words 3 deal p
tom dave mary

   words 6 toss p
mary mary dave dave mary tom

   dealx 2 3
0 1
1 1
0 2
1 2
0 0
1 0

   3 dealx 3 5 7
2 4 6
1 0 6
2 4 5

   4 tossx 2 3
0 2
1 2
1 1
0 2


>>  <<  Ndx  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  wd  Help  User