![]() |
Home | Libraries | License | Support | People | ALPS Web Site |
alps::random::parallel::lcg64 — a 64-bit linear congruential generator
// In header: <alps/random/parallel/lcg64.hpp> template<uint64_t a, uint64_t val> class lcg64 { public: // types typedef uint64_t result_type; // The result type is a 64-bit unsigned integer. // construct/copy/destruct lcg64(...); // public member functions void seed(...); result_type min() const; result_type max() const; result_type operator()(); // public static functions static bool validation(uint64_t); // public data members static const bool has_fixed_range; // This generator has a fixed range. static const result_type min_value; // The minimum vaue is 0. static const result_type max_value; // The maximum value is the largest unsigned 64 bit integer. static const result_type max_streams; // The maximum number of streams is 146138719, the number of primes among all 64-bit unsigned integer values. };
A 64-bit parallel linear congruential generator, following the implementation of the SPRNG library
lcg64
public member functionsvoid seed(...);the seed fuctions
All standard and named parameter seed functions of random number generator and parallel random number generators are provided
result_type min() const;
Returns: |
the minimum value 0 |
result_type max() const;
Returns: |
the maximum value, the largest unsigned 64-bit integer |
result_type operator()();
Returns: |
the next random number |
Copyright © 2006-2008 Brigitte Surer, Matthias Troyer |