pure-cpp 1.0.0
A C++ physics simulation benchmark comparing performance with Python implementations
pcg_random.hpp File Reference

A minimal C++ implementation of the PCG32 random number generator. More...

#include <cstdint>
#include <limits>
Include dependency graph for pcg_random.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Rng::Pcg32
 A 32-bit Permuted Congruential Generator (pcg32). More...
 

Detailed Description

A minimal C++ implementation of the PCG32 random number generator.

Author
M.E. O'Neill (original implementation)

This file provides a standalone implementation of pcg32, a 32-bit output random number generator from the PCG family. It is designed to be a drop-in replacement for standard C++ random number engines like std::mt19937.

The PCG family of generators is known for its excellent statistical properties, small code size, and high performance.

This implementation is based on the C++ code provided on the official PCG website: http://www.pcg-random.org/

The original PCG library is distributed under the MIT or Apache 2.0 licenses. This minimal version is provided for convenience.

Definition in file pcg_random.hpp.