geomc 1.0
A c++ linear algebra template library
Loading...
Searching...
No Matches
DenseUniformDistribution< T > Struct Template Reference

A random number generator that produces uniformly-distributed values. More...

#include <geomc/random/DenseDistribution.h>

Inheritance diagram for DenseUniformDistribution< T >:

Detailed Description

template<typename T>
struct geom::DenseUniformDistribution< T >

A random number generator that produces uniformly-distributed values.

Many uniform random number generators only generate a small subset of the representable floating point values. This generator produces all possible values in the range [0,1] with equal probability by directly constructing the mantissa and exponent of a floating point number.

Pharr discusses the method used here: https://pharr.org/matt/blog/2022/03/05/sampling-fp-unit-interval

Non-float types fall back to std::uniform_real_distribution.


The documentation for this struct was generated from the following file: