BioCMAMC-ST
MC::Distributions::Uniform< F > Struct Template Reference

#include <prng_extension.hpp>

Collaboration diagram for MC::Distributions::Uniform< F >:
[legend]

Public Member Functions

template<class DeviceType>
KOKKOS_INLINE_FUNCTION F draw (Kokkos::Random_XorShift1024< DeviceType > &gen) const
 Draws a random sample from the distribution.
KOKKOS_INLINE_FUNCTION F mean () const
 Returns the mean of the distribution.
KOKKOS_INLINE_FUNCTION F var () const
 Returns the variance of the distribution.
KOKKOS_INLINE_FUNCTION F skewness () const
 Returns the skewness of the distribution.

Static Public Member Functions

template<class DeviceType>
static KOKKOS_INLINE_FUNCTION F draw_from (Kokkos::Random_XorShift1024< DeviceType > &gen, F min, F max)
 Static method to draw a sample from N(μ, σ).

Public Attributes

min
 min
max
 Max.

Member Function Documentation

◆ draw()

template<FloatingPointType F>
template<class DeviceType>
KOKKOS_INLINE_FUNCTION F MC::Distributions::Uniform< F >::draw ( Kokkos::Random_XorShift1024< DeviceType > & gen) const
inline

Draws a random sample from the distribution.

Template Parameters
DeviceTypeThe Kokkos execution device.
Parameters
genKokkos random number generator.
Returns
A normally distributed random sample.
Here is the call graph for this function:

◆ draw_from()

template<FloatingPointType F>
template<class DeviceType>
KOKKOS_INLINE_FUNCTION F MC::Distributions::Uniform< F >::draw_from ( Kokkos::Random_XorShift1024< DeviceType > & gen,
F min,
F max )
inlinestatic

Static method to draw a sample from N(μ, σ).

Template Parameters
DeviceTypeThe Kokkos execution device.
Parameters
genKokkos random number generator.
muMean of the distribution.
sigmaStandard deviation of the distribution.
Returns
A normally distributed random sample.
Here is the caller graph for this function:

◆ mean()

template<FloatingPointType F>
KOKKOS_INLINE_FUNCTION F MC::Distributions::Uniform< F >::mean ( ) const
inline

Returns the mean of the distribution.

Returns
Mean (μ).

◆ skewness()

template<FloatingPointType F>
KOKKOS_INLINE_FUNCTION F MC::Distributions::Uniform< F >::skewness ( ) const
inline

Returns the skewness of the distribution.

Returns
Skewness (always 0 for a normal distribution).

◆ var()

template<FloatingPointType F>
KOKKOS_INLINE_FUNCTION F MC::Distributions::Uniform< F >::var ( ) const
inline

Returns the variance of the distribution.

Returns
Variance (σ²).

Member Data Documentation

◆ max

Max.

◆ min

min


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