1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-15 11:52:15 +02:00
Files
coreutils/gl/modules/randperm
Pádraig Brady 27873f1deb shuf: use memory more efficiently when returning a subset
* gl/lib/randperm.c (randperm_new): When the number of items
to return H, is much smaller than the total number of items N,
use a hash to represent the sparse permutations of the set N.
This is currently enabled for N > 128K and N/H > 32.
* tests/misc/shuf: Ensure shuf can quickly return 2 numbers
from a large range.
* gl/modules/randperm: Depend on hash.
* NEWS: Mention the change.
2011-05-14 10:30:12 +01:00

26 lines
241 B
Plaintext

Description:
Generate random permutations.
Files:
lib/randperm.c
lib/randperm.h
Depends-on:
randint
xalloc
hash
configure.ac:
Makefile.am:
lib_SOURCES += randperm.c randperm.h
Include:
"randperm.h"
License
GPL
Maintainer:
Paul Eggert