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); | mersenne_twister_engine(); | ||||
explicit mersenne_twister_engine(result_type value); | |||||
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); | subtract_with_carry_engine(); | ||||
explicit subtract_with_carry_engine(result_type value); | |||||
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"); | random_device(); | ||||
explicit random_device(const string& token); | |||||
// 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 53 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_int_distribution(IntType a = 0, | uniform_int_distribution(); | ||||
explicit uniform_int_distribution(IntType a, | |||||
IntType b = numeric_limits<IntType>::max()); | IntType b = numeric_limits<IntType>::max()); | ||||
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); | ||||
▲ Show 20 Lines • Show All 43 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); | uniform_real_distribution(); | ||||
explicit uniform_real_distribution(RealType a, RealType b = 1.0); | |||||
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); | bernoulli_distribution(); | ||||
explicit bernoulli_distribution(double p); | |||||
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); | binomial_distribution() : binomial_distribution(1) {} | ||||
explicit binomial_distribution(IntType t, double p = 0.5); | |||||
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); | geometric_distribution() : geometric_distribution(0.5) {} | ||||
explicit geometric_distribution(double p); | |||||
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); | negative_binomial_distribution() : negative_binomial_distribution(1) {} | ||||
explicit negative_binomial_distribution(result_type k, double p = 0.5); | |||||
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); | poisson_distribution() : poisson_distribution(1.0) {} | ||||
explicit poisson_distribution(double mean); | |||||
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); | exponential_distribution() : exponential_distribution(1.0) {} | ||||
explicit exponential_distribution(result_type lambda); | |||||
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); | gamma_distribution() : gamma_distribution(1) {} | ||||
explicit gamma_distribution(result_type alpha, result_type beta = 1); | |||||
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); | weibull_distribution() : weibull_distribution(1); | ||||
explicit weibull_distribution(result_type a, result_type b = 1); | |||||
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); | extreme_value_distribution() : extreme_value_distribution(0) {} | ||||
explicit extreme_value_distribution(result_type a, result_type b = 1); | |||||
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); | normal_distribution() : normal_distribution(0) {} | ||||
explicit normal_distribution(result_type mean, result_type stddev = 1); | |||||
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); | lognormal_distribution() : lognormal_distribution(0) {} | ||||
explicit lognormal_distribution(result_type m, result_type s = 1); | |||||
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); | chi_squared_distribution() : chi_squared_distribution(1); | ||||
explicit chi_squared_distribution(result_type n); | |||||
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); | cauchy_distribution() : cauchy_distribution(0) {} | ||||
explicit cauchy_distribution(result_type a, result_type b = 1); | |||||
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); | fisher_f_distribution() : fisher_f_distribution(1) {} | ||||
explicit fisher_f_distribution(result_type m, result_type n = 1); | |||||
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); | student_t_distribution() : student_t_distribution(1) {} | ||||
explicit student_t_distribution(result_type n); | |||||
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 4,933 Lines • Show Last 20 Lines |
Please disregard modifications to stuff other than linear_congruential_engine.