diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-07-01 18:10:49 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-07-01 18:10:49 -0700 |
commit | 77deceded0e5c9143e01d07a19eb219b3273151b (patch) | |
tree | f2447cc6c50cf459a3c271c25a7b4d4437b6280b /regex.c | |
parent | c23882b230f65ddc87742e206a56270d09c73684 (diff) | |
download | txr-77deceded0e5c9143e01d07a19eb219b3273151b.tar.gz txr-77deceded0e5c9143e01d07a19eb219b3273151b.tar.bz2 txr-77deceded0e5c9143e01d07a19eb219b3273151b.zip |
New functions: cshuffle and cnshuffle.
These functions find random cyclic permutations.
* eval.c (eval_init): Register cshuffle and cnshuffle
intrinsics.
* lib.c (nshuffle_impl): New static function, formed out of
nshuffle.
(nhuffle): Now wrapper around nshuffle_impl.
(shuffle): Also wraps nshuffle_impl rather than nshuffle.
(cnshuffle, cshuffle): New funtions.
* lib.h (cnshuffle, cshuffle): Declared.
* txr.1: Documented new functions. Also added warning
about limitations on permutation reachability in relation
to PRNG state size.
Diffstat (limited to 'regex.c')
0 files changed, 0 insertions, 0 deletions