diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-01-29 00:06:19 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-01-29 00:06:19 -0800 |
commit | aeae4fc3dcfbb4b5376515e5660134e79a4f54c3 (patch) | |
tree | 41f4802e73ec8e5204382ff88783fb82281087c2 /stdlib/doc-syms.tl | |
parent | 43f5cf62900830004b53a5df989bad6eece71052 (diff) | |
download | txr-aeae4fc3dcfbb4b5376515e5660134e79a4f54c3.tar.gz txr-aeae4fc3dcfbb4b5376515e5660134e79a4f54c3.tar.bz2 txr-aeae4fc3dcfbb4b5376515e5660134e79a4f54c3.zip |
New function: random-sample.
Implements reservoir sampling.
* rand.c (radom_float_impl): New static function, made out of
random_float. Returns double, giving us access to the unboxed
result
(random_float): Now a wrapper around random_float_impl: boxes
the result of random_float.
(elrd, flrd, random_sample): New static functions.
(rand_init): Register random-sample intrinsic.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'stdlib/doc-syms.tl')
-rw-r--r-- | stdlib/doc-syms.tl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/stdlib/doc-syms.tl b/stdlib/doc-syms.tl index 723ea9c2..71302389 100644 --- a/stdlib/doc-syms.tl +++ b/stdlib/doc-syms.tl @@ -175,7 +175,7 @@ ("blksize-t" "N-01153D9E") ("block" "D-006F") ("block*" "N-02F60DCE") - ("bool" "D-002D") + ("bool" "D-002C") ("boundp" "N-01FBF828") ("bracket" "N-02400F97") ("break-str" "N-00A9DB25") @@ -1085,7 +1085,7 @@ ("kill" "N-0386CCD5") ("krs" "N-02D33A4D") ("labels" "N-0209307D") - ("lambda" "D-002C") + ("lambda" "D-002D") ("lambda-match" "N-031E43FF") ("lambda-set" "N-02FEBA97") ("last" "D-0042") @@ -1547,6 +1547,7 @@ ("random-fixnum" "N-03A57C86") ("random-float" "N-0276C623") ("random-float-incl" "N-0276C623") + ("random-sample" "N-0107F246") ("random-state-get-vec" "N-005C0F98") ("random-state-p" "N-00C9A749") ("range" "N-033BE5A1") |