RandomLib
1.10
|
Header for Random, RandomGenerator. More...
#include <RandomLib/Config.h>
#include <stdint.h>
#include <stdexcept>
#include <RandomLib/RandomCanonical.hpp>
Go to the source code of this file.
Classes | |
class | RandomLib::RandomErr |
Exception handling for RandomLib. More... | |
Namespaces | |
RandomLib | |
Namespace for RandomLib. | |
Macros | |
#define | RANDOMLIB_POWERTABLE 1 |
#define | RANDOMLIB_LONGDOUBLEPREC 53 |
#define | STATIC_ASSERT(cond, reason) { enum{ STATIC_ASSERT_ENUM = 1/int(cond) }; } |
#define | RANDOMLIB_HASDENORM(RealType) 1 |
#define | RANDOMLIB_EXPORT |
#define | RANDOMLIB_DEFAULT_GENERATOR SRandomGenerator32 |
Typedefs | |
typedef RANDOMLIB_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.
Copyright (c) Charles Karney (2006-2011) charl and licensed under the MIT/X11 License. For more information, see es@k arney .comhttp://randomlib.sourceforge.net/
Definition in file Random.hpp.
#define RANDOMLIB_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 this capability though! And it's back in g++ 4.4. So, for simplicity, assume that all "current" versions of g++ perform the optimization.
Definition at line 37 of file Random.hpp.
#define RANDOMLIB_LONGDOUBLEPREC 53 |
Definition at line 42 of file Random.hpp.
Referenced by RandomLib::RandomCanonical< Generator >::RandomCanonical().
#define STATIC_ASSERT | ( | cond, | |
reason | |||
) | { enum{ STATIC_ASSERT_ENUM = 1/int(cond) }; } |
A compile-time assert. Use C++11 static_assert, if available.
Definition at line 64 of file Random.hpp.
#define RANDOMLIB_HASDENORM | ( | RealType | ) | 1 |
Are denormalized reals of type RealType supported?
Definition at line 72 of file Random.hpp.
Referenced by RandomLib::RandomCanonical< Generator >::RandomCanonical().
#define RANDOMLIB_EXPORT |
Definition at line 83 of file Random.hpp.
#define RANDOMLIB_DEFAULT_GENERATOR SRandomGenerator32 |
Definition at line 124 of file Random.hpp.