Star-SamPling Random number generators & random variates

Star-SP 0.12.1 is available

The Star-SamPling library provides a set of random number generators as well as a large collection of random variates. Its API is pure C and the exposed functions make no reference to the actual generator used. One can thus easely switch the generator without any impact on the application source code.

Star-SamPling proposes generators well suited for use in simulation: they have extremely long periods and low correlation. In addition of regular generators such as Mersen Twister or RANLUX, it relies on the Random123 library to provide "counter based" generators that satisfy rigourous statistical testing.

Gaussian distribution and its cumulative used to generate a sample according to this probability distribution function.

Beyond uniform distribution, Star-SamPling can be used to generate random variates from exponental, gaussian or lognormal distributions. It also implements uniform sampling of a triangle, a disk, a sphere, an hemisphere or a circle as well as the cosine weighted sampling of an hemisphere or the sampling of a sphere with respect to the Henyey & Greenstein function.

Star-SamPling provides the notion of proxy of a random number generator. A proxy is used to split the random numbers of a generator in a set of N partitions, where N is a user defined parameter. Each partition is assigned to a generator that is actually a regular generator regarding the Star-SamPling API. The main benefit is that such generators can be used by different processes that concurrently participate to the same simulation since in such situation each process must ensure that it relies on its own set of random numbers. Star-SamPling is thus well suited to parallel computations that use message passing and/or shared memory communication models.

Release notes

Version 0.12.1

Fix creating a random number proxy generator using the KISS type: this type was considered invalid while it is not.

Version 0.12

Ensures C++11 compliance to correct gcc 11 compilation errors. On the other hand, this introduces API breaks.

According to the C++11 standard, the min/max values of a UniformRandomBitGenerator must be static constant expressions. But until now, gcc has been flexible enough to allow the use of UniformRandomBitGenerators with regular min/max values. At run time, the caller could thus define its own RNG type as provided by the struct ssp_rng_type data structure. Unfortunately, since its version 11, gcc is more severe and refuses to compile this code.

This version updates the API to respect this C++11 constraint. The ssp_rng_type is no longer a structure; it becomes an enumeration which is then instantiated internally in a specific UniformRandomBitGenerator with min/max values resolved at compilation time.

Version 0.11.1

Sets the CMake minimum version to 3.1 in the Random123Config.cmake file: since CMake 3.20, version 2 has become obsolete.

Version 0.11

Version 0.10

Version 0.9

Version 0.8.1

Version 0.8

Version 0.7

Version 0.6

Version 0.5

Version 0.4


Copyright © 2015-2021 |Meso|Star> ( Star-Sampling is free software released under the CeCILLv2.1 license. You are welcome to redistribute it under certain conditions; refer to the COPYING files for details.