Include: random_uniform(a, b) random_triangular(low, high, mode) random_betavariate(alpha, beta) random_expovariate(lambd) random_gammavariate(alpha, beta) random_gaussian(mu, sigma) random_lognormvariate(mu, sigma) random_normalvariate(mu, sigma) random_vonmisesvariate(mu, kappa) random_paretovariate(alpha) random_weibullvariate(alpha, beta)
First need to implement state structures for each generator
This allows functions to be called directly from C++ programs. Use:
* Header file foo.h * #ifdef __cplusplus * If this is a C++ compiler, use extern C linkage. * extern “C” { #endif
#ifdef __cplusplus * ifdef __cplusplus * } #endif
Use something like:
#ifdef _MSC_VER
typedef __int32 int32_t; typedef unsigned __int32 uint32_t; typedef __int64 int64_t; typedef unsigned __int64 uint64_t;
#else #include <stdint.h> #endif
but more comprehensive.
Using something like:
#ifdef _MSC_VER #define INLINE __forceinline * use __forceinline (VC++ specific) * #else #define INLINE inline * use standard inline * #endif
INLINE void helloworld() { * inline function body * }