common/random_select: central place for reservoir sampling.

Turns out we can make quite a simple API out of it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-08-11 14:35:56 +09:30
parent 12d0d5c185
commit 496c0dd1e6
11 changed files with 76 additions and 59 deletions

View File

@@ -70,6 +70,7 @@ PLUGIN_COMMON_OBJS := \
common/node_id.o \
common/param.o \
common/pseudorand.o \
common/random_select.o \
common/setup.o \
common/type_to_string.o \
common/utils.o \