Helper functions for taking random samples and seeding RNGs from the system clock. More...
#include <sys/time.h>
Go to the source code of this file.
Namespaces | |
namespace | cluster |
Namespace for everything in the cluster library. | |
Functions | |
template<class OutputIterator , class Random > | |
void | random_subset (size_t numElements, size_t sample_size, OutputIterator out, Random &random) |
This is Knuth's algorithm R for taking a sample of indices from 0 to numElements. | |
long | get_time_seed () |
Returns a reasonably distributed seed for random number generators. |
Helper functions for taking random samples and seeding RNGs from the system clock.
Definition in file random.h.