Muster
 All Classes Namespaces Files Functions Variables Typedefs Macros
random.h File Reference

Helper functions for taking random samples and seeding RNGs from the system clock. More...

#include <sys/time.h>
#include <tr1/unordered_map>
Include dependency graph for random.h:
This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

Helper functions for taking random samples and seeding RNGs from the system clock.

Author
Todd Gamblin tgamb.nosp@m.lin@.nosp@m.llnl..nosp@m.gov

Definition in file random.h.

Muster. Copyright © 2010, Lawrence Livermore National Laboratory, LLNL-CODE-433662.
Distribution of Muster and its documentation is subject to terms of the Muster LICENSE.
Generated on Thu Sep 1 2016 using Doxygen 1.8.5