gumbel#
Class is used for generation of Gumbel distributed real types random numbers.
Description
The class object is used in the oneapi::math::rng::generate() function to provide random numbers Gumbel distributed with displacement \(a\), and scalefactor \((b, \beta)\), where \(a, \beta \in R; \beta > 0\).
The probability distribution is given by:
The cumulative distribution function is as follows:
class gumbel#
Syntax
namespace oneapi::math::rng {
template<typename RealType = float, typename Method = gumbel_method::by_default>
class gumbel {
public:
using method_type = Method;
using result_type = RealType;
gumbel();
explicit gumbel(RealType a, RealType b);
RealType a() const;
RealType b() const;
};
}
Template parameters
- typename RealType
- Type of the produced values. Supported types:
float
double
- typename Method = oneapi::math::rng::gumbel_method::by_default
Transformation method, which will be used for generation. Supported types:
oneapi::math::rng::gumbel_method::by_default
oneapi::math::rng::gumbel_method::icdf
See description of the methods in Distributions methods template parameter.
Class Members
Routine |
Description |
---|---|
Default constructor |
|
Constructor with parameters |
|
Method to obtain displacement value |
|
Method to obtain scalefactor value |
Member types
gumbel::method_type = Method
Description
The type which defines transformation method for generation.
gumbel::result_type = RealType
Description
The type which defines type of generated random numbers.
Constructors
gumbel::gumbel()
Description
Default constructor for distribution, parameters set as a = 0.0, and beta = 1.0.
explicit gumbel::gumbel(RealType a, RealType b)
Description
Constructor with parameters. a is a displacement value, beta is a scalefactor value.
Throws
- oneapi::math::invalid_argument
Exception is thrown when \(b \leq\) static_cast<RealType>(0.0)
Characteristics
RealType gumbel::a() const
Return Value
Returns the distribution parameter a - displacement value.
RealType gumbel::b() const
Return Value
Returns the distribution parameter b - scalefactor value.
Parent topic: Host Distributions