Skip to content

Latest commit

 

History

History
83 lines (64 loc) · 2.39 KB

TODO

File metadata and controls

83 lines (64 loc) · 2.39 KB

Core features

Implement Marsaglia KISS generators <2012-10-11 Thu>

Implement 32-bit Mersenne Twister <2012-10-12 Fri>

Implement 64-bit Mersenne Twister <2012-10-13 Sat>

Implement 32- and 64-bit SFMT

Implement WELL algorithm

Implement Xorshift generators

Implement seeding routines, taking take to avoid “bad” seeds

Implement remaining unit tests and automatic test script

Remove file system dependency from Mersenne Twister tests

Documentation

Contributing document

Library overview and function reference

Mathematics behind each generator

History of Marsaglia’s generators (where did my implementations come from?)

Miscellaneous enhancements

Implement generators for floating point deviates

Implement generators for distributions other than uniform

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)

Implement a function for drawing from dev/urandom.

To check: should seeds be declared as static?

Implement parallel streams and “jumping ahead”

First need to implement state structures for each generator

Function/macro prefixs to avoid namespace conflicts

Use extern “C” linkage in header files

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

Add support for Windows systems

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.

Force inlining of core generators?

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 * }