|
BioCMAMC-ST
|
Represents a Scaled TruncatedNormal (Gaussian) probability distribution. More...
#include <prng_extension.hpp>
Public Member Functions | |
| constexpr | ScaledTruncatedNormal (F factor, F m, F s, F l, F u) |
| template<class DeviceType> | |
| KOKKOS_INLINE_FUNCTION F | draw (Kokkos::Random_XorShift1024< DeviceType > &gen) const |
| KOKKOS_INLINE_FUNCTION F | mean () const |
| KOKKOS_INLINE_FUNCTION F | var () const |
| KOKKOS_INLINE_FUNCTION F | skewness () const |
Static Public Member Functions | |
| template<class DeviceType> | |
| static KOKKOS_INLINE_FUNCTION F | draw_from (Kokkos::Random_XorShift1024< DeviceType > &gen, F factor, F mu, F sigma, F lower, F upper) |
Public Attributes | |
| F | scale_factor |
| F | inverse_factor |
| TruncatedNormal< F > | dist |
Represents a Scaled TruncatedNormal (Gaussian) probability distribution.
The normal distribution is parameterized by a mean, a standard deviation a scale factor and lower and upper bound. It supports random sampling, computing statistical properties. To sample from [a, b] where |a - b| << 1, methods perform better if we draw from xf = [a * factor, b * factor] and then scale back using x = xf / factor.
| F | Floating-point type (must satisfy FloatingPointType). |
|
inlineconstexpr |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
| TruncatedNormal<F> MC::Distributions::ScaledTruncatedNormal< F >::dist |
| F MC::Distributions::ScaledTruncatedNormal< F >::inverse_factor |
| F MC::Distributions::ScaledTruncatedNormal< F >::scale_factor |