Celeritas 0.6.0-2+develop.96611fab
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
celeritas::GenerateCanonical< Generator, RealType > Struct Template Reference

Generate random numbers in [0, 1). More...

#include <GenerateCanonical.hh>

Public Types

Type aliases
using real_type = RealType
 
using result_type = real_type
 

Public Member Functions

result_type operator() (Generator &rng)
 Generate random numbers in [0, 1).
 

Static Public Attributes

static constexpr auto policy = GenerateCanonicalPolicy::std
 By default use standard library.
 

Detailed Description

template<class Generator, class RealType = ::celeritas::real_type>
struct celeritas::GenerateCanonical< Generator, RealType >

Generate random numbers in [0, 1).

This is essentially an implementation detail; partial specialization can be used to sample using special functions with a given generator.

Todo:
For 1.0 refactor so that if RNGs have a builtin policy we call our builtin functions; if they have a custom we call a function on the RNG itself; and if they don't define a policy (e.g. a standard library one) we fall back to calling std::generate_canonical.

Member Function Documentation

◆ operator()()

Generate random numbers in [0, 1).

This is the default implementation, for CPU-only code.


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