diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-01-29 00:27:09 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-01-29 00:27:09 -0800 |
commit | 09010c1509a30cdd042f1b31a1ecd84922adbba2 (patch) | |
tree | 631c9050f8ee41ac8131ea8ee1f6a3df2be0ffb7 /stdlib/except.tl | |
parent | aeae4fc3dcfbb4b5376515e5660134e79a4f54c3 (diff) | |
download | txr-09010c1509a30cdd042f1b31a1ecd84922adbba2.tar.gz txr-09010c1509a30cdd042f1b31a1ecd84922adbba2.tar.bz2 txr-09010c1509a30cdd042f1b31a1ecd84922adbba2.zip |
random-sample: replace algorithm R.
* rand.c (random_sample): The brnach of the code for lists is
converted from the naive algorithm R which requires a random
integer for each element of the sequence to a list adaptation
of the smarter algorithm L used for vector. We don't have
random access through the list being sampled, but we can step
to new positions without generating random numbers.
Diffstat (limited to 'stdlib/except.tl')
0 files changed, 0 insertions, 0 deletions