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 6489 2008-11-10 21:37:47Z 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://charles.karney.info/random/
Definition in file Random.hpp.
#define RANDOM_HPP "$Id: Random.hpp 6489 2008-11-10 21:37:47Z ckarney $" |
Definition at line 15 of file Random.hpp.
#define WINDOWS 0 |
Definition at line 23 of file Random.hpp.
#define SUN 0 |
Definition at line 29 of file Random.hpp.
#define RANDOM_U32_T uint32_t |
The type for 32-bit results
Definition at line 41 of file Random.hpp.
#define RANDOM_U64_T uint64_t |
The type for 44-bit results
Definition at line 45 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 55 of file Random.hpp.
#define HAVE_SSE2 0 |
Definition at line 59 of file Random.hpp.
#define HAVE_ALTIVEC 0 |
Definition at line 71 of file Random.hpp.
#define HAVE_BOOST_SERIALIZATION 0 |
Use boost serialization?
Definition at line 78 of file Random.hpp.
#define RANDOM_LEGACY 0 |
Instantiate legacy classes MixerMT0 and MixerMT1?
Definition at line 85 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 97 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 109 of file Random.hpp.
Referenced by RandomLib::RandomCanonical< Generator >::RandomCanonical().
#define STATIC_ASSERT | ( | cond, | |||
reason | ) | { enum{ STATIC_ASSERT_ENUM = 1/int(cond) }; } |
A simple compile-time assert.
Definition at line 119 of file Random.hpp.
Referenced by RandomLib::RandomCanonical< Generator >::Bits(), RandomLib::RandomCanonical< Generator >::Fixed(), RandomLib::RandomCanonical< Generator >::FixedC(), RandomLib::RandomCanonical< Generator >::FixedO(), RandomLib::RandomCanonical< Generator >::FixedW(), RandomLib::RandomCanonical< Generator >::FloatZ(), RandomLib::RandomNumber< bits >::Fraction(), RandomLib::RandomNumber< bits >::Init(), RandomLib::RandomEngine< Algorithm, Mixer >::Init(), RandomLib::RandomCanonical< Generator >::Integer(), RandomLib::RandomCanonical< Generator >::IntegerC(), RandomLib::SFMT19937< RandomType >::NormalizeState(), RandomLib::RandomCanonical< Generator >::ProbF(), RandomLib::RandomCanonical< Generator >::RandomCanonical(), RandomLib::RandomSelect< NumericType >::RandomSelect(), RandomLib::RandomSeed::SeedWord(), and RandomLib::RandomNumber< bits >::Value().
#define RANDOM_HASDENORM | ( | RealType | ) | 1 |
Are denormalized reals of type RealType supported?
Definition at line 126 of file Random.hpp.
Referenced by RandomLib::RandomCanonical< Generator >::FloatZ(), and RandomLib::RandomCanonical< Generator >::RandomCanonical().
#define DEFAULT_GENERATOR SRandomGenerator32 |
Definition at line 133 of file Random.hpp.