Celeritas  0.5.0-86+4a8eea4
Classes | Functions
GenerateCanonical.hh File Reference
#include <limits>
#include <random>
#include <type_traits>
#include "corecel/Macros.hh"
#include "corecel/Types.hh"
This graph shows which files directly or indirectly include this file:

Classes

class  celeritas::GenerateCanonical< Generator, RealType >
 Generate random numbers in [0, 1). More...
 

Functions

template<class RealType , class Generator >
CELER_FUNCTION RealType celeritas::generate_canonical (Generator &g)
 Helper function to generate a random uniform number. More...
 
template<class Generator >
CELER_FUNCTION real_type celeritas::generate_canonical (Generator &g)
 Sample a real_type on [0, 1). More...
 

Function Documentation

◆ generate_canonical() [1/2]

template<class RealType , class Generator >
CELER_FUNCTION RealType celeritas::generate_canonical ( Generator &  g)
inline

Helper function to generate a random uniform number.

Helper function to generate a random real number in [0, 1).

◆ generate_canonical() [2/2]

template<class Generator >
CELER_FUNCTION real_type celeritas::generate_canonical ( Generator &  g)
inline

Sample a real_type on [0, 1).

Helper function to generate a random real number in [0, 1).