Changeset View
Changeset View
Standalone View
Standalone View
libcxx/include/random
Show All 30 Lines | public: | ||||
static constexpr result_type multiplier = a; | static constexpr result_type multiplier = a; | ||||
static constexpr result_type increment = c; | static constexpr result_type increment = c; | ||||
static constexpr result_type modulus = m; | static constexpr result_type modulus = m; | ||||
static constexpr result_type min() { return c == 0u ? 1u: 0u;} | static constexpr result_type min() { return c == 0u ? 1u: 0u;} | ||||
static constexpr result_type max() { return m - 1u;} | static constexpr result_type max() { return m - 1u;} | ||||
static constexpr result_type default_seed = 1u; | static constexpr result_type default_seed = 1u; | ||||
// constructors and seeding functions | // constructors and seeding functions | ||||
explicit linear_congruential_engine(result_type s = default_seed); | explicit linear_congruential_engine(result_type s = default_seed); // before C++20 | ||||
linear_congruential_engine() : linear_congruential_engine(default_seed) {} // C++20 | |||||
explicit linear_congruential_engine(result_type s); // C++20 | |||||
template<class Sseq> explicit linear_congruential_engine(Sseq& q); | template<class Sseq> explicit linear_congruential_engine(Sseq& q); | ||||
void seed(result_type s = default_seed); | void seed(result_type s = default_seed); | ||||
template<class Sseq> void seed(Sseq& q); | template<class Sseq> void seed(Sseq& q); | ||||
// generating functions | // generating functions | ||||
result_type operator()(); | result_type operator()(); | ||||
void discard(unsigned long long z); | void discard(unsigned long long z); | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | public: | ||||
static constexpr result_type tempering_c = c; | static constexpr result_type tempering_c = c; | ||||
static constexpr size_t tempering_l = l; | static constexpr size_t tempering_l = l; | ||||
static constexpr result_type initialization_multiplier = f; | static constexpr result_type initialization_multiplier = f; | ||||
static constexpr result_type min () { return 0; } | static constexpr result_type min () { return 0; } | ||||
static constexpr result_type max() { return 2^w - 1; } | static constexpr result_type max() { return 2^w - 1; } | ||||
static constexpr result_type default_seed = 5489u; | static constexpr result_type default_seed = 5489u; | ||||
// constructors and seeding functions | // constructors and seeding functions | ||||
explicit mersenne_twister_engine(result_type value = default_seed); | explicit mersenne_twister_engine(result_type s = default_seed); // before C++20 | ||||
mersenne_twister_engine() : mersenne_twister_engine(default_seed) {} // C++20 | |||||
explicit mersenne_twister_engine(result_type s); // C++20 | |||||
template<class Sseq> explicit mersenne_twister_engine(Sseq& q); | template<class Sseq> explicit mersenne_twister_engine(Sseq& q); | ||||
curdeius: Please disregard modifications to stuff other than `linear_congruential_engine`. | |||||
void seed(result_type value = default_seed); | void seed(result_type value = default_seed); | ||||
template<class Sseq> void seed(Sseq& q); | template<class Sseq> void seed(Sseq& q); | ||||
// generating functions | // generating functions | ||||
result_type operator()(); | result_type operator()(); | ||||
void discard(unsigned long long z); | void discard(unsigned long long z); | ||||
}; | }; | ||||
Show All 40 Lines | public: | ||||
static constexpr size_t word_size = w; | static constexpr size_t word_size = w; | ||||
static constexpr size_t short_lag = s; | static constexpr size_t short_lag = s; | ||||
static constexpr size_t long_lag = r; | static constexpr size_t long_lag = r; | ||||
static constexpr result_type min() { return 0; } | static constexpr result_type min() { return 0; } | ||||
static constexpr result_type max() { return m-1; } | static constexpr result_type max() { return m-1; } | ||||
static constexpr result_type default_seed = 19780503u; | static constexpr result_type default_seed = 19780503u; | ||||
// constructors and seeding functions | // constructors and seeding functions | ||||
explicit subtract_with_carry_engine(result_type value = default_seed); | explicit subtract_with_carry_engine(result_type value = default_seed); // before C++20 | ||||
subtract_with_carry_engine() : subtract_with_carry_engine(default_seed) {} // C++20 | |||||
explicit subtract_with_carry_engine(result_type value); // C++20 | |||||
template<class Sseq> explicit subtract_with_carry_engine(Sseq& q); | template<class Sseq> explicit subtract_with_carry_engine(Sseq& q); | ||||
void seed(result_type value = default_seed); | void seed(result_type value = default_seed); | ||||
template<class Sseq> void seed(Sseq& q); | template<class Sseq> void seed(Sseq& q); | ||||
// generating functions | // generating functions | ||||
result_type operator()(); | result_type operator()(); | ||||
void discard(unsigned long long z); | void discard(unsigned long long z); | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 214 Lines • ▼ Show 20 Lines | public: | ||||
// types | // types | ||||
typedef unsigned int result_type; | typedef unsigned int result_type; | ||||
// generator characteristics | // generator characteristics | ||||
static constexpr result_type min() { return numeric_limits<result_type>::min(); } | static constexpr result_type min() { return numeric_limits<result_type>::min(); } | ||||
static constexpr result_type max() { return numeric_limits<result_type>::max(); } | static constexpr result_type max() { return numeric_limits<result_type>::max(); } | ||||
// constructors | // constructors | ||||
explicit random_device(const string& token = "/dev/urandom"); | explicit random_device(const string& token = implementation-defined); // before C++20 | ||||
random_device() : random_device(implementation-defined) {} // C++20 | |||||
explicit random_device(const string& token); // C++20 | |||||
// generating functions | // generating functions | ||||
result_type operator()(); | result_type operator()(); | ||||
// property functions | // property functions | ||||
double entropy() const noexcept; | double entropy() const noexcept; | ||||
// no copy functions | // no copy functions | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | public: | ||||
result_type b() const; | result_type b() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructors and reset functions | // constructors and reset functions | ||||
explicit uniform_int_distribution(IntType a = 0, | explicit uniform_int_distribution(IntType a = 0, | ||||
IntType b = numeric_limits<IntType>::max()); | IntType b = numeric_limits<IntType>::max()); // before C++20 | ||||
uniform_int_distribution() : uniform_int_distribution(0) {} // C++20 | |||||
explicit uniform_int_distribution(IntType a, | |||||
IntType b = numeric_limits<IntType>::max()); // C++20 | |||||
explicit uniform_int_distribution(const param_type& parm); | explicit uniform_int_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | public: | ||||
result_type a() const; | result_type a() const; | ||||
result_type b() const; | result_type b() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructors and reset functions | // constructors and reset functions | ||||
explicit uniform_real_distribution(RealType a = 0.0, RealType b = 1.0); | explicit uniform_real_distribution(RealType a = 0.0, RealType b = 1.0); // before C++20 | ||||
uniform_real_distribution() : uniform_real_distribution(0.0) {} // C++20 | |||||
explicit uniform_real_distribution(RealType a, RealType b = 1.0); // C++20 | |||||
explicit uniform_real_distribution(const param_type& parm); | explicit uniform_real_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
Show All 39 Lines | public: | ||||
double p() const; | double p() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructors and reset functions | // constructors and reset functions | ||||
explicit bernoulli_distribution(double p = 0.5); | explicit bernoulli_distribution(double p = 0.5); // before C++20 | ||||
bernoulli_distribution() : bernoulli_distribution(0.5) {} // C++20 | |||||
explicit bernoulli_distribution(double p); // C++20 | |||||
explicit bernoulli_distribution(const param_type& parm); | explicit bernoulli_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
Show All 40 Lines | public: | ||||
IntType t() const; | IntType t() const; | ||||
double p() const; | double p() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructors and reset functions | // constructors and reset functions | ||||
explicit binomial_distribution(IntType t = 1, double p = 0.5); | explicit binomial_distribution(IntType t = 1, double p = 0.5); // before C++20 | ||||
binomial_distribution() : binomial_distribution(1) {} // C++20 | |||||
explicit binomial_distribution(IntType t, double p = 0.5); // C++20 | |||||
explicit binomial_distribution(const param_type& parm); | explicit binomial_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
Show All 40 Lines | public: | ||||
double p() const; | double p() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructors and reset functions | // constructors and reset functions | ||||
explicit geometric_distribution(double p = 0.5); | explicit geometric_distribution(double p = 0.5); // before C++20 | ||||
geometric_distribution() : geometric_distribution(0.5) {} // C++20 | |||||
explicit geometric_distribution(double p); // C++20 | |||||
explicit geometric_distribution(const param_type& parm); | explicit geometric_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
Show All 40 Lines | public: | ||||
result_type k() const; | result_type k() const; | ||||
double p() const; | double p() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructor and reset functions | // constructor and reset functions | ||||
explicit negative_binomial_distribution(result_type k = 1, double p = 0.5); | explicit negative_binomial_distribution(IntType k = 1, double p = 0.5); // before C++20 | ||||
negative_binomial_distribution() : negative_binomial_distribution(1) {} // C++20 | |||||
explicit negative_binomial_distribution(IntType k, double p = 0.5); // C++20 | |||||
explicit negative_binomial_distribution(const param_type& parm); | explicit negative_binomial_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
Show All 40 Lines | public: | ||||
double mean() const; | double mean() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructors and reset functions | // constructors and reset functions | ||||
explicit poisson_distribution(double mean = 1.0); | explicit poisson_distribution(double mean = 1.0); // before C++20 | ||||
poisson_distribution() : poisson_distribution(1.0) {} // C++20 | |||||
explicit poisson_distribution(double mean); // C++20 | |||||
explicit poisson_distribution(const param_type& parm); | explicit poisson_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
Show All 39 Lines | public: | ||||
result_type lambda() const; | result_type lambda() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructors and reset functions | // constructors and reset functions | ||||
explicit exponential_distribution(result_type lambda = 1.0); | explicit exponential_distribution(RealType lambda = 1.0); // before C++20 | ||||
exponential_distribution() : exponential_distribution(1.0) {} // C++20 | |||||
explicit exponential_distribution(RealType lambda); // C++20 | |||||
explicit exponential_distribution(const param_type& parm); | explicit exponential_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
Show All 40 Lines | public: | ||||
result_type alpha() const; | result_type alpha() const; | ||||
result_type beta() const; | result_type beta() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructors and reset functions | // constructors and reset functions | ||||
explicit gamma_distribution(result_type alpha = 1, result_type beta = 1); | explicit gamma_distribution(RealType alpha = 0.0, RealType beta = 1.0); // before C++20 | ||||
gamma_distribution() : gamma_distribution(0.0) {} // C++20 | |||||
explicit gamma_distribution(RealType alpha, RealType beta = 1.0); // C++20 | |||||
explicit gamma_distribution(const param_type& parm); | explicit gamma_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | public: | ||||
result_type a() const; | result_type a() const; | ||||
result_type b() const; | result_type b() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructor and reset functions | // constructor and reset functions | ||||
explicit weibull_distribution(result_type a = 1, result_type b = 1); | explicit weibull_distribution(RealType a = 1.0, RealType b = 1.0); // before C++20 | ||||
weibull_distribution() : weibull_distribution(1.0) {} // C++20 | |||||
explicit weibull_distribution(RealType a, RealType b = 1.0); // C++20 | |||||
explicit weibull_distribution(const param_type& parm); | explicit weibull_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | public: | ||||
result_type a() const; | result_type a() const; | ||||
result_type b() const; | result_type b() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructor and reset functions | // constructor and reset functions | ||||
explicit extreme_value_distribution(result_type a = 0, result_type b = 1); | explicit extreme_value_distribution(RealType a = 0.0, RealType b = 1.0); // before C++20 | ||||
extreme_value_distribution() : extreme_value_distribution(0.0) {} // C++20 | |||||
explicit extreme_value_distribution(RealType a, RealType b = 1.0); // C++20 | |||||
explicit extreme_value_distribution(const param_type& parm); | explicit extreme_value_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | public: | ||||
result_type mean() const; | result_type mean() const; | ||||
result_type stddev() const; | result_type stddev() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructors and reset functions | // constructors and reset functions | ||||
explicit normal_distribution(result_type mean = 0, result_type stddev = 1); | explicit normal_distribution(RealType mean = 0.0, RealType stddev = 1.0); // before C++20 | ||||
normal_distribution() : normal_distribution(0.0) {} // C++20 | |||||
explicit normal_distribution(RealType mean, RealType stddev = 1.0); // C++20 | |||||
explicit normal_distribution(const param_type& parm); | explicit normal_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | public: | ||||
result_type m() const; | result_type m() const; | ||||
result_type s() const; | result_type s() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructor and reset functions | // constructor and reset functions | ||||
explicit lognormal_distribution(result_type m = 0, result_type s = 1); | explicit lognormal_distribution(RealType mean = 0.0, RealType stddev = 1.0); // before C++20 | ||||
lognormal_distribution() : lognormal_distribution(0.0) {} // C++20 | |||||
explicit lognormal_distribution(RealType mean, RealType stddev = 1.0); // C++20 | |||||
explicit lognormal_distribution(const param_type& parm); | explicit lognormal_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
Show All 40 Lines | public: | ||||
result_type n() const; | result_type n() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructor and reset functions | // constructor and reset functions | ||||
explicit chi_squared_distribution(result_type n = 1); | explicit chi_squared_distribution(RealType n = 1.0); // before C++20 | ||||
chi_squared_distribution() : chi_squared_distribution(1.0) {} // C++20 | |||||
explicit chi_squared_distribution(RealType n); // C++20 | |||||
explicit chi_squared_distribution(const param_type& parm); | explicit chi_squared_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
Show All 40 Lines | public: | ||||
result_type a() const; | result_type a() const; | ||||
result_type b() const; | result_type b() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructor and reset functions | // constructor and reset functions | ||||
explicit cauchy_distribution(result_type a = 0, result_type b = 1); | explicit cauchy_distribution(RealType a = 0.0, RealType b = 1.0); // before C++20 | ||||
cauchy_distribution() : cauchy_distribution(0.0) {} // C++20 | |||||
explicit cauchy_distribution(RealType a, RealType b = 1.0); // C++20 | |||||
explicit cauchy_distribution(const param_type& parm); | explicit cauchy_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | public: | ||||
result_type m() const; | result_type m() const; | ||||
result_type n() const; | result_type n() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructor and reset functions | // constructor and reset functions | ||||
explicit fisher_f_distribution(result_type m = 1, result_type n = 1); | explicit fisher_f_distribution(RealType m = 1.0, RealType n = 1.0); // before C++20 | ||||
fisher_f_distribution() : fisher_f_distribution(1.0) {} // C++20 | |||||
explicit fisher_f_distribution(RealType m, RealType n = 1.0); // C++20 | |||||
explicit fisher_f_distribution(const param_type& parm); | explicit fisher_f_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
Show All 40 Lines | public: | ||||
result_type n() const; | result_type n() const; | ||||
friend bool operator==(const param_type& x, const param_type& y); | friend bool operator==(const param_type& x, const param_type& y); | ||||
friend bool operator!=(const param_type& x, const param_type& y); | friend bool operator!=(const param_type& x, const param_type& y); | ||||
}; | }; | ||||
// constructor and reset functions | // constructor and reset functions | ||||
explicit student_t_distribution(result_type n = 1); | explicit student_t_distribution(RealType n = 1.0); // before C++20 | ||||
student_t_distribution() : student_t_distribution(1.0) {} // C++20 | |||||
explicit student_t_distribution(RealType n); // C++20 | |||||
explicit student_t_distribution(const param_type& parm); | explicit student_t_distribution(const param_type& parm); | ||||
void reset(); | void reset(); | ||||
// generating functions | // generating functions | ||||
template<class URNG> result_type operator()(URNG& g); | template<class URNG> result_type operator()(URNG& g); | ||||
template<class URNG> result_type operator()(URNG& g, const param_type& parm); | template<class URNG> result_type operator()(URNG& g, const param_type& parm); | ||||
// property functions | // property functions | ||||
▲ Show 20 Lines • Show All 485 Lines • ▼ Show 20 Lines | public: | ||||
static _LIBCPP_CONSTEXPR const result_type modulus = __m; | static _LIBCPP_CONSTEXPR const result_type modulus = __m; | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
static _LIBCPP_CONSTEXPR result_type min() {return _Min;} | static _LIBCPP_CONSTEXPR result_type min() {return _Min;} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
static _LIBCPP_CONSTEXPR result_type max() {return _Max;} | static _LIBCPP_CONSTEXPR result_type max() {return _Max;} | ||||
static _LIBCPP_CONSTEXPR const result_type default_seed = 1u; | static _LIBCPP_CONSTEXPR const result_type default_seed = 1u; | ||||
// constructors and seeding functions | // constructors and seeding functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
linear_congruential_engine() : linear_congruential_engine(default_seed) {} | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit linear_congruential_engine(result_type __s) { seed(__s); } | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit linear_congruential_engine(result_type __s = default_seed) | explicit linear_congruential_engine(result_type __s = default_seed) { | ||||
{seed(__s);} | seed(__s); | ||||
} | |||||
#endif | |||||
template<class _Sseq> | template<class _Sseq> | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit linear_congruential_engine(_Sseq& __q, | explicit linear_congruential_engine(_Sseq& __q, | ||||
typename enable_if<__is_seed_sequence<_Sseq, linear_congruential_engine>::value>::type* = 0) | typename enable_if<__is_seed_sequence<_Sseq, linear_congruential_engine>::value>::type* = 0) | ||||
{seed(__q);} | {seed(__q);} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void seed(result_type __s = default_seed) | void seed(result_type __s = default_seed) | ||||
{seed(integral_constant<bool, __m == 0>(), | {seed(integral_constant<bool, __m == 0>(), | ||||
▲ Show 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | public: | ||||
static _LIBCPP_CONSTEXPR const result_type initialization_multiplier = __f; | static _LIBCPP_CONSTEXPR const result_type initialization_multiplier = __f; | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
static _LIBCPP_CONSTEXPR result_type min() { return _Min; } | static _LIBCPP_CONSTEXPR result_type min() { return _Min; } | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
static _LIBCPP_CONSTEXPR result_type max() { return _Max; } | static _LIBCPP_CONSTEXPR result_type max() { return _Max; } | ||||
static _LIBCPP_CONSTEXPR const result_type default_seed = 5489u; | static _LIBCPP_CONSTEXPR const result_type default_seed = 5489u; | ||||
// constructors and seeding functions | // constructors and seeding functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit mersenne_twister_engine(result_type __sd = default_seed) | mersenne_twister_engine() : mersenne_twister_engine(default_seed) {} | ||||
{seed(__sd);} | _LIBCPP_INLINE_VISIBILITY | ||||
explicit mersenne_twister_engine(result_type __sd) { seed(__sd); } | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit mersenne_twister_engine(result_type __sd = default_seed) { | |||||
seed(__sd); | |||||
} | |||||
#endif | |||||
template<class _Sseq> | template<class _Sseq> | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit mersenne_twister_engine(_Sseq& __q, | explicit mersenne_twister_engine(_Sseq& __q, | ||||
typename enable_if<__is_seed_sequence<_Sseq, mersenne_twister_engine>::value>::type* = 0) | typename enable_if<__is_seed_sequence<_Sseq, mersenne_twister_engine>::value>::type* = 0) | ||||
{seed(__q);} | {seed(__q);} | ||||
void seed(result_type __sd = default_seed); | void seed(result_type __sd = default_seed); | ||||
template<class _Sseq> | template<class _Sseq> | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
▲ Show 20 Lines • Show All 439 Lines • ▼ Show 20 Lines | public: | ||||
static _LIBCPP_CONSTEXPR const size_t long_lag = __r; | static _LIBCPP_CONSTEXPR const size_t long_lag = __r; | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
static _LIBCPP_CONSTEXPR result_type min() { return _Min; } | static _LIBCPP_CONSTEXPR result_type min() { return _Min; } | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
static _LIBCPP_CONSTEXPR result_type max() { return _Max; } | static _LIBCPP_CONSTEXPR result_type max() { return _Max; } | ||||
static _LIBCPP_CONSTEXPR const result_type default_seed = 19780503u; | static _LIBCPP_CONSTEXPR const result_type default_seed = 19780503u; | ||||
// constructors and seeding functions | // constructors and seeding functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
subtract_with_carry_engine() : subtract_with_carry_engine(default_seed) {} | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit subtract_with_carry_engine(result_type __sd = default_seed) | explicit subtract_with_carry_engine(result_type __sd) { seed(__sd); } | ||||
{seed(__sd);} | #else | ||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit subtract_with_carry_engine(result_type __sd = default_seed) { | |||||
seed(__sd); | |||||
} | |||||
#endif | |||||
template<class _Sseq> | template<class _Sseq> | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit subtract_with_carry_engine(_Sseq& __q, | explicit subtract_with_carry_engine(_Sseq& __q, | ||||
typename enable_if<__is_seed_sequence<_Sseq, subtract_with_carry_engine>::value>::type* = 0) | typename enable_if<__is_seed_sequence<_Sseq, subtract_with_carry_engine>::value>::type* = 0) | ||||
{seed(__q);} | {seed(__q);} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void seed(result_type __sd = default_seed) | void seed(result_type __sd = default_seed) | ||||
{seed(__sd, integral_constant<unsigned, 1 + (__w - 1) / 32>());} | {seed(__sd, integral_constant<unsigned, 1 + (__w - 1) / 32>());} | ||||
▲ Show 20 Lines • Show All 923 Lines • ▼ Show 20 Lines | public: | ||||
static _LIBCPP_CONSTEXPR const result_type _Max = 0xFFFFFFFFu; | static _LIBCPP_CONSTEXPR const result_type _Max = 0xFFFFFFFFu; | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
static _LIBCPP_CONSTEXPR result_type min() { return _Min;} | static _LIBCPP_CONSTEXPR result_type min() { return _Min;} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
static _LIBCPP_CONSTEXPR result_type max() { return _Max;} | static _LIBCPP_CONSTEXPR result_type max() { return _Max;} | ||||
// constructors | // constructors | ||||
#if _LIBCPP_STD_VER > 17 | |||||
random_device() : random_device("/dev/urandom") {} | |||||
explicit random_device(const string& __token); | |||||
#else | |||||
explicit random_device(const string& __token = "/dev/urandom"); | explicit random_device(const string& __token = "/dev/urandom"); | ||||
#endif | |||||
~random_device(); | ~random_device(); | ||||
// generating functions | // generating functions | ||||
result_type operator()(); | result_type operator()(); | ||||
// property functions | // property functions | ||||
double entropy() const _NOEXCEPT; | double entropy() const _NOEXCEPT; | ||||
▲ Show 20 Lines • Show All 217 Lines • ▼ Show 20 Lines | public: | ||||
{return !(__x == __y);} | {return !(__x == __y);} | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
public: | public: | ||||
// constructors and reset functions | // constructors and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
uniform_real_distribution() : uniform_real_distribution(0.0) {} | |||||
explicit uniform_real_distribution(result_type __a, result_type __b = 1.0) | |||||
: __p_(param_type(__a, __b)) {} | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit uniform_real_distribution(result_type __a = 0, result_type __b = 1) | explicit uniform_real_distribution(result_type __a = 0, result_type __b = 1) | ||||
: __p_(param_type(__a, __b)) {} | : __p_(param_type(__a, __b)) {} | ||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit uniform_real_distribution(const param_type& __p) : __p_(__p) {} | explicit uniform_real_distribution(const param_type& __p) : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {} | void reset() {} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | public: | ||||
{return !(__x == __y);} | {return !(__x == __y);} | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
public: | public: | ||||
// constructors and reset functions | // constructors and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
bernoulli_distribution() : bernoulli_distribution(0.5) {} | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit bernoulli_distribution(double __p) : __p_(param_type(__p)) {} | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit bernoulli_distribution(double __p = 0.5) | explicit bernoulli_distribution(double __p = 0.5) : __p_(param_type(__p)) {} | ||||
: __p_(param_type(__p)) {} | #endif | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit bernoulli_distribution(const param_type& __p) : __p_(__p) {} | explicit bernoulli_distribution(const param_type& __p) : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {} | void reset() {} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | public: | ||||
friend class binomial_distribution; | friend class binomial_distribution; | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
public: | public: | ||||
// constructors and reset functions | // constructors and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
binomial_distribution() : binomial_distribution(1) {} | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit binomial_distribution(result_type __t, double __p = 0.5) | |||||
: __p_(param_type(__t, __p)) {} | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit binomial_distribution(result_type __t = 1, double __p = 0.5) | explicit binomial_distribution(result_type __t = 1, double __p = 0.5) | ||||
: __p_(param_type(__t, __p)) {} | : __p_(param_type(__t, __p)) {} | ||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit binomial_distribution(const param_type& __p) : __p_(__p) {} | explicit binomial_distribution(const param_type& __p) : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {} | void reset() {} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
▲ Show 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | public: | ||||
{return !(__x == __y);} | {return !(__x == __y);} | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
public: | public: | ||||
// constructors and reset functions | // constructors and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
exponential_distribution() : exponential_distribution(1.0) {} | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit exponential_distribution(result_type __lambda) | |||||
: __p_(param_type(__lambda)) {} | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit exponential_distribution(result_type __lambda = 1) | explicit exponential_distribution(result_type __lambda = 1.0) | ||||
: __p_(param_type(__lambda)) {} | : __p_(param_type(__lambda)) {} | ||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit exponential_distribution(const param_type& __p) : __p_(__p) {} | explicit exponential_distribution(const param_type& __p) : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {} | void reset() {} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
▲ Show 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | |||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
result_type _V_; | result_type _V_; | ||||
bool _V_hot_; | bool _V_hot_; | ||||
public: | public: | ||||
// constructors and reset functions | // constructors and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit normal_distribution(result_type __mean = 0, result_type __stddev = 1) | normal_distribution() : normal_distribution(0.0) {} | ||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit normal_distribution(result_type __mean, result_type __stddev = 1.0) | |||||
: __p_(param_type(__mean, __stddev)), _V_hot_(false) {} | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit normal_distribution(result_type __mean = 0.0, | |||||
result_type __stddev = 1.0) | |||||
: __p_(param_type(__mean, __stddev)), _V_hot_(false) {} | : __p_(param_type(__mean, __stddev)), _V_hot_(false) {} | ||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit normal_distribution(const param_type& __p) | explicit normal_distribution(const param_type& __p) | ||||
: __p_(__p), _V_hot_(false) {} | : __p_(__p), _V_hot_(false) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {_V_hot_ = false;} | void reset() {_V_hot_ = false;} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
▲ Show 20 Lines • Show All 161 Lines • ▼ Show 20 Lines | public: | ||||
lognormal_distribution<_RT>& __x); | lognormal_distribution<_RT>& __x); | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
public: | public: | ||||
// constructor and reset functions | // constructor and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
lognormal_distribution() : lognormal_distribution(0.0) {} | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit lognormal_distribution(result_type __m = 0, result_type __s = 1) | explicit lognormal_distribution(result_type __m, result_type __s = 1.0) | ||||
: __p_(param_type(__m, __s)) {} | : __p_(param_type(__m, __s)) {} | ||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit lognormal_distribution(result_type __m = 0.0, | |||||
result_type __s = 1.0) | |||||
: __p_(param_type(__m, __s)) {} | |||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit lognormal_distribution(const param_type& __p) | explicit lognormal_distribution(const param_type& __p) | ||||
: __p_(__p) {} | : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {__p_.__nd_.reset();} | void reset() {__p_.__nd_.reset();} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
▲ Show 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | public: | ||||
friend class poisson_distribution; | friend class poisson_distribution; | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
public: | public: | ||||
// constructors and reset functions | // constructors and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
poisson_distribution() : poisson_distribution(1.0) {} | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit poisson_distribution(double __mean) | |||||
: __p_(__mean) {} | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit poisson_distribution(double __mean = 1.0) : __p_(__mean) {} | explicit poisson_distribution(double __mean = 1.0) | ||||
: __p_(__mean) {} | |||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit poisson_distribution(const param_type& __p) : __p_(__p) {} | explicit poisson_distribution(const param_type& __p) : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {} | void reset() {} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
▲ Show 20 Lines • Show All 211 Lines • ▼ Show 20 Lines | public: | ||||
{return !(__x == __y);} | {return !(__x == __y);} | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
public: | public: | ||||
// constructor and reset functions | // constructor and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
weibull_distribution() : weibull_distribution(1.0) {} | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit weibull_distribution(result_type __a, result_type __b = 1) | |||||
: __p_(param_type(__a, __b)) {} | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit weibull_distribution(result_type __a = 1, result_type __b = 1) | explicit weibull_distribution(result_type __a = 1.0, result_type __b = 1.0) | ||||
: __p_(param_type(__a, __b)) {} | : __p_(param_type(__a, __b)) {} | ||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit weibull_distribution(const param_type& __p) | explicit weibull_distribution(const param_type& __p) | ||||
: __p_(__p) {} | : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {} | void reset() {} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | public: | ||||
{return !(__x == __y);} | {return !(__x == __y);} | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
public: | public: | ||||
// constructor and reset functions | // constructor and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
extreme_value_distribution() : extreme_value_distribution(0.0) {} | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit extreme_value_distribution(result_type __a, result_type __b = 1.0) | |||||
: __p_(param_type(__a, __b)) {} | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit extreme_value_distribution(result_type __a = 0, result_type __b = 1) | explicit extreme_value_distribution(result_type __a = 0.0, | ||||
result_type __b = 1.0) | |||||
: __p_(param_type(__a, __b)) {} | : __p_(param_type(__a, __b)) {} | ||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit extreme_value_distribution(const param_type& __p) | explicit extreme_value_distribution(const param_type& __p) | ||||
: __p_(__p) {} | : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {} | void reset() {} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
▲ Show 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | public: | ||||
{return !(__x == __y);} | {return !(__x == __y);} | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
public: | public: | ||||
// constructors and reset functions | // constructors and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit gamma_distribution(result_type __alpha = 1, result_type __beta = 1) | gamma_distribution() : gamma_distribution(1.0) {} | ||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit gamma_distribution(result_type __alpha, result_type __beta = 1.0) | |||||
: __p_(param_type(__alpha, __beta)) {} | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit gamma_distribution(result_type __alpha = 1.0, | |||||
result_type __beta = 1.0) | |||||
: __p_(param_type(__alpha, __beta)) {} | : __p_(param_type(__alpha, __beta)) {} | ||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit gamma_distribution(const param_type& __p) | explicit gamma_distribution(const param_type& __p) | ||||
: __p_(__p) {} | : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {} | void reset() {} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
▲ Show 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | public: | ||||
{return !(__x == __y);} | {return !(__x == __y);} | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
public: | public: | ||||
// constructor and reset functions | // constructor and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
negative_binomial_distribution() : negative_binomial_distribution(1) {} | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit negative_binomial_distribution(result_type __k = 1, double __p = 0.5) | explicit negative_binomial_distribution(result_type __k, double __p = 0.5) | ||||
: __p_(__k, __p) {} | : __p_(__k, __p) {} | ||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit negative_binomial_distribution(result_type __k = 1, | |||||
double __p = 0.5) | |||||
: __p_(__k, __p) {} | |||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit negative_binomial_distribution(const param_type& __p) : __p_(__p) {} | explicit negative_binomial_distribution(const param_type& __p) : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {} | void reset() {} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
▲ Show 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | public: | ||||
{return !(__x == __y);} | {return !(__x == __y);} | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
public: | public: | ||||
// constructors and reset functions | // constructors and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
geometric_distribution() : geometric_distribution(0.5) {} | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit geometric_distribution(double __p) | |||||
: __p_(__p) {} | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit geometric_distribution(double __p = 0.5) : __p_(__p) {} | explicit geometric_distribution(double __p = 0.5) | ||||
: __p_(__p) {} | |||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit geometric_distribution(const param_type& __p) : __p_(__p) {} | explicit geometric_distribution(const param_type& __p) : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {} | void reset() {} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | public: | ||||
{return !(__x == __y);} | {return !(__x == __y);} | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
public: | public: | ||||
// constructor and reset functions | // constructor and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
chi_squared_distribution() : chi_squared_distribution(1.0) {} | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit chi_squared_distribution(result_type __n) | |||||
: __p_(param_type(__n)) {} | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit chi_squared_distribution(result_type __n = 1) | explicit chi_squared_distribution(result_type __n = 1.0) | ||||
: __p_(param_type(__n)) {} | : __p_(param_type(__n)) {} | ||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit chi_squared_distribution(const param_type& __p) | explicit chi_squared_distribution(const param_type& __p) | ||||
: __p_(__p) {} | : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {} | void reset() {} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | public: | ||||
{return !(__x == __y);} | {return !(__x == __y);} | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
public: | public: | ||||
// constructor and reset functions | // constructor and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
cauchy_distribution() : cauchy_distribution(0.0) {} | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit cauchy_distribution(result_type __a, result_type __b = 1.0) | |||||
: __p_(param_type(__a, __b)) {} | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit cauchy_distribution(result_type __a = 0, result_type __b = 1) | explicit cauchy_distribution(result_type __a = 0.0, result_type __b = 1.0) | ||||
: __p_(param_type(__a, __b)) {} | : __p_(param_type(__a, __b)) {} | ||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit cauchy_distribution(const param_type& __p) | explicit cauchy_distribution(const param_type& __p) | ||||
: __p_(__p) {} | : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {} | void reset() {} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
▲ Show 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | public: | ||||
{return !(__x == __y);} | {return !(__x == __y);} | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
public: | public: | ||||
// constructor and reset functions | // constructor and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
fisher_f_distribution() : fisher_f_distribution(1.0) {} | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit fisher_f_distribution(result_type __m, result_type __n = 1.0) | |||||
: __p_(param_type(__m, __n)) {} | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit fisher_f_distribution(result_type __m = 1, result_type __n = 1) | explicit fisher_f_distribution(result_type __m = 1.0, result_type __n = 1.0) | ||||
: __p_(param_type(__m, __n)) {} | : __p_(param_type(__m, __n)) {} | ||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit fisher_f_distribution(const param_type& __p) | explicit fisher_f_distribution(const param_type& __p) | ||||
: __p_(__p) {} | : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {} | void reset() {} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
▲ Show 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | public: | ||||
}; | }; | ||||
private: | private: | ||||
param_type __p_; | param_type __p_; | ||||
normal_distribution<result_type> __nd_; | normal_distribution<result_type> __nd_; | ||||
public: | public: | ||||
// constructor and reset functions | // constructor and reset functions | ||||
#if _LIBCPP_STD_VER > 17 | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
student_t_distribution() : student_t_distribution(1.0) {} | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
explicit student_t_distribution(result_type __n) | |||||
: __p_(param_type(__n)) {} | |||||
#else | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit student_t_distribution(result_type __n = 1) | explicit student_t_distribution(result_type __n = 1.0) | ||||
: __p_(param_type(__n)) {} | : __p_(param_type(__n)) {} | ||||
#endif | |||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
explicit student_t_distribution(const param_type& __p) | explicit student_t_distribution(const param_type& __p) | ||||
: __p_(__p) {} | : __p_(__p) {} | ||||
_LIBCPP_INLINE_VISIBILITY | _LIBCPP_INLINE_VISIBILITY | ||||
void reset() {__nd_.reset();} | void reset() {__nd_.reset();} | ||||
// generating functions | // generating functions | ||||
template<class _URNG> | template<class _URNG> | ||||
▲ Show 20 Lines • Show All 972 Lines • Show Last 20 Lines |
Please disregard modifications to stuff other than linear_congruential_engine.