Muster
|
Helper functions for taking random samples and seeding RNGs from the system clock. More...
#include <sys/time.h>
#include <tr1/unordered_map>
Go to the source code of this file.
Namespaces | |
cluster | |
Namespace for everything in the cluster library. | |
Functions | |
template<class OutputIterator , class Random > | |
void | algorithm_r (size_t numElements, size_t sample_size, OutputIterator out, Random &random) |
This is Knuth's algorithm R for taking a sample of numElements numbers. More... | |
template<class OutputIterator , class Random > | |
void | fast_sample (size_t numElements, size_t sample_size, OutputIterator out, Random &random) |
This is a fast algorithm for random sampling that scales with the number of elements sampled (sample_size). More... | |
long | get_time_seed () |
Returns a seed for random number generators based on the product of sec and usec from gettimeofday(). More... | |
Helper functions for taking random samples and seeding RNGs from the system clock.
Definition in file random.h.