Header for Random, RandomGenerator. More...
#include <stdint.h>
#include "RandomLib/RandomCanonical.hpp"
Go to the source code of this file.
Namespaces | |
namespace | RandomLib |
Defines | |
#define | RANDOM_HPP "$Id: Random.hpp 6723 2010-01-11 14:20:10Z ckarney $" |
#define | WINDOWS 0 |
#define | SUN 0 |
#define | RANDOM_U32_T uint32_t |
#define | RANDOM_U64_T uint64_t |
#define | RCSID_DECL(x) namespace { char VAR_ ## x [] = x; } |
#define | HAVE_SSE2 0 |
#define | HAVE_ALTIVEC 0 |
#define | HAVE_BOOST_SERIALIZATION 0 |
#define | RANDOM_LEGACY 0 |
#define | RANDOM_POWERTABLE 1 |
#define | RANDOM_LONGDOUBLEPREC __LDBL_MANT_DIG__ |
#define | STATIC_ASSERT(cond, reason) { enum{ STATIC_ASSERT_ENUM = 1/int(cond) }; } |
#define | RANDOM_HASDENORM(RealType) 1 |
#define | DEFAULT_GENERATOR SRandomGenerator32 |
Typedefs | |
typedef DEFAULT_GENERATOR | RandomLib::RandomGenerator |
typedef RandomCanonical < RandomGenerator > | RandomLib::Random |
Header for Random, RandomGenerator.
This loads up the header for RandomCanonical, RandomEngine, etc., to provide access to random integers of various sizes, random reals with various precisions, a random probability, etc.
Written by Charles Karney <charles@karney.com> and licensed under the LGPL. For more information, see http://randomlib.sourceforge.net/
Definition in file Random.hpp.
#define RANDOM_HPP "$Id: Random.hpp 6723 2010-01-11 14:20:10Z ckarney $" |
Definition at line 14 of file Random.hpp.
#define WINDOWS 0 |
Definition at line 22 of file Random.hpp.
#define SUN 0 |
Definition at line 28 of file Random.hpp.
#define RANDOM_U32_T uint32_t |
The type for 32-bit results
Definition at line 40 of file Random.hpp.
#define RANDOM_U64_T uint64_t |
The type for 44-bit results
Definition at line 44 of file Random.hpp.
#define RCSID_DECL | ( | x | ) | namespace { char VAR_ ## x [] = x; } |
Insertion of RCS Id strings into the object file.
Definition at line 54 of file Random.hpp.
#define HAVE_SSE2 0 |
Definition at line 58 of file Random.hpp.
#define HAVE_ALTIVEC 0 |
Definition at line 70 of file Random.hpp.
#define HAVE_BOOST_SERIALIZATION 0 |
Use boost serialization?
Definition at line 77 of file Random.hpp.
#define RANDOM_LEGACY 0 |
Instantiate legacy classes MixerMT0 and MixerMT1?
Definition at line 84 of file Random.hpp.
#define RANDOM_POWERTABLE 1 |
Use table, Power2::power2, for pow2? This isn't necessary with g++ 4.0 because calls to std::pow are optimized. g++ 4.1 seems to have lost thiscapability though!
Definition at line 96 of file Random.hpp.
#define RANDOM_LONGDOUBLEPREC __LDBL_MANT_DIG__ |
The precision of long doubles, used for sizing Power2::power2. 64 on Linux/Intel, 106 on MaxOS/PowerPC
Definition at line 108 of file Random.hpp.
Referenced by RandomLib::RandomCanonical::RandomCanonical().
#define STATIC_ASSERT | ( | cond, | |
reason | |||
) | { enum{ STATIC_ASSERT_ENUM = 1/int(cond) }; } |
A simple compile-time assert.
Definition at line 118 of file Random.hpp.
Referenced by RandomLib::RandomSeed::SeedWord(), RandomLib::RandomEngine::Init(), RandomLib::SFMT19937::NormalizeState(), RandomLib::RandomCanonical::Integer(), RandomLib::RandomCanonical::Fixed(), RandomLib::RandomCanonical::FixedW(), RandomLib::RandomCanonical::FixedO(), RandomLib::RandomCanonical::FixedC(), RandomLib::RandomCanonical::RandomCanonical(), RandomLib::RandomCanonical::IntegerC(), RandomLib::RandomCanonical::FloatZ(), RandomLib::RandomCanonical::ProbF(), and RandomLib::RandomCanonical::Bits().
#define RANDOM_HASDENORM | ( | RealType | ) | 1 |
Are denormalized reals of type RealType supported?
Definition at line 125 of file Random.hpp.
Referenced by RandomLib::RandomCanonical::RandomCanonical(), and RandomLib::RandomCanonical::FloatZ().
#define DEFAULT_GENERATOR SRandomGenerator32 |
Definition at line 132 of file Random.hpp.