Class ActsFatras::LandauDistribution¶
-
class LandauDistribution¶
Draw random numbers from a Landau distribution.
Implements the same interface as the standard library distributions.
Public Types
-
using result_type = double¶
The type of the generated values.
Public Functions
-
inline LandauDistribution(double location, double scale)¶
Construct directly from the distribution parameters.
-
inline LandauDistribution(const param_type &cfg)¶
Construct from a parameter object.
-
LandauDistribution() = default¶
-
LandauDistribution(const LandauDistribution&) = default¶
-
LandauDistribution(LandauDistribution&&) = default¶
-
inline result_type max() const¶
The maximum value the distribution generates.
-
inline result_type min() const¶
The minimum value the distribution generates.
-
template<typename Generator>
inline result_type operator()(Generator &generator)¶ Generate a random number from the configured Landau distribution.
-
template<typename Generator>
inline result_type operator()(Generator &generator, const param_type ¶ms)¶ Generate a random number from the given Landau distribution.
-
LandauDistribution &operator=(const LandauDistribution&) = default¶
-
LandauDistribution &operator=(LandauDistribution&&) = default¶
-
inline param_type param() const¶
Return the currently configured distribution parameters.
-
inline void param(const param_type &cfg)¶
Set the distribution parameters.
-
inline void reset()¶
Reset any possible internal state. Noop, since there is no internal state.
Friends
-
inline friend bool operator!=(const LandauDistribution &lhs, const LandauDistribution &rhs)¶
-
inline friend bool operator==(const LandauDistribution &lhs, const LandauDistribution &rhs)¶
Provide standard comparison operators.
-
struct param_type¶
Parameter struct that contains all distribution parameters.
Public Types
-
using distribution_type = LandauDistribution¶
Parameters must link back to the host distribution.
Public Functions
-
inline param_type(double location_, double scale_)¶
Construct from parameters.
-
param_type() = default¶
-
param_type(const param_type&) = default¶
-
param_type(param_type&&) = default¶
-
param_type &operator=(const param_type&) = default¶
-
param_type &operator=(param_type&&) = default¶
Public Members
-
double location = 0.0¶
Location parameter.
Warning
This is neither the mean nor the most probable value.
-
double scale = 1.0¶
Scale parameter.
Friends
-
inline friend bool operator!=(const param_type &lhs, const param_type &rhs)¶
-
inline friend bool operator==(const param_type &lhs, const param_type &rhs)¶
Parameters should be EqualityComparable.
-
using distribution_type = LandauDistribution¶
-
using result_type = double¶