Celeritas 0.7+981ab2d
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::TruncatedDistribution< Distribution > Class Template Reference

Sample from a truncated distribution. More...

#include <TruncatedDistribution.hh>

Public Types

Type aliases
using real_type = typename Distribution::real_type
 
using result_type = typename Distribution::result_type
 
using RecordT = TruncatedDistributionRecord< typename Distribution::RecordT >
 

Public Member Functions

template<class... Args>
 TruncatedDistribution (real_type lower, real_type upper, Args &&... args)
 Construct with distribution and truncation bounds.
 
 TruncatedDistribution (RecordT const &record)
 
template<class Generator >
result_type operator() (Generator &rng)
 
template<class Generator >
auto operator() (Generator &rng) -> result_type
 Sample a random number according to the truncated distribution.
 

Detailed Description

template<class Distribution>
class celeritas::TruncatedDistribution< Distribution >

Sample from a truncated distribution.

Sample from an arbitrary distribution truncated to a finite interval. Values are drawn from the underlying distribution using rejection sampling until they fall within the truncation bounds.


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