+2007-02-23 Jim Meyering <jim@meyering.net>
+
+ * randperm.c (randperm_new): Comment: say that this function
+ returns a pointer to malloc'd storage.
+
2007-02-18 Jim Meyering <jim@meyering.net>
* xfts.c: Include <stdlib.h> rather than exit.h, now that stdlib.h
/* Generate random permutations.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return bound;
}
-/* From R, allocate and return the first H elements of a random
- permutation of N elements. H must not exceed N. Return NULL if H
- is zero. */
+/* From R, allocate and return a malloc'd array of the first H elements
+ of a random permutation of N elements. H must not exceed N.
+ Return NULL if H is zero. */
size_t *
randperm_new (struct randint_source *r, size_t h, size_t n)