The lagged XOR engine adaptor implements a simple yet robust technique for generating independent random number streams. It has the following properties: Fast. The overhead has been tested to be approx 10% on top of Mersenne Twister for lag up to 150, and looks constant -doesn’t increase with the lag size-. Portable. It’s compatible with [...]
Category Archives: Programming
Lagged XOR Engine Adaptor in C++ for Generating Parallel Random Number Streams
Generating Random Numbers in C++ with Boost.Random
The boost libraries (boost.org) are high regarded C++ libraries, and a lot of those libraries have ended up being accepted in the C++ standard.
Generating Random Numbers in C++ with the native TR1 implementation
The new upcoming C++11 standard offers great support for random number generation in C++. If you have Visual Studio 2008 with the Visual Studio Feature Pack -or- with SP1 installed, or GCC 4.2 or higher, then the code below should work.
Generating Correlated Random Numbers
This article describes common methods that are used in generating correlated random numbers.
A Simple and Extremely Fast C++ Template for Matrices and Tensors
This article describes a very simple and efficient solution for handling matrices and tensors in C++. The idea is to store the matrix (or tensor) in a standard vector by translating the multidimensional index to a one dimensional index.
Weighted Single-pass Mean and Covariance
One of the algorithms used in the Probability Engine is a weighted covariance calculation. Instead of using a simple two pass algorithm, we chose for a single pass algorithm that improves both speed and accuracy.