PR69240 Define inequality operators for <random> param types
authorJonathan Wakely <jwakely@redhat.com>
Fri, 20 Jan 2017 15:28:48 +0000 (15:28 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 20 Jan 2017 15:28:48 +0000 (15:28 +0000)
PR libstdc++/69240
* include/bits/random.h (uniform_real_distribution::param_type)
(normal_distribution::param_type, lognormal_distribution::param_type)
(gamma_distribution::param_type, chi_squared_distribution::param_type)
(cauchy_distribution::param_type, fisher_f_distribution::param_type)
(student_t_distribution::param_type)
(bernoulli_distribution::param_type, binomial_distribution::param_type)
(geometric_distribution::param_type)
(negative_binomial_distribution::param_type)
(poisson_distribution::param_type)
(exponential_distribution::param_type)
(weibull_distribution::param_type)
(extreme_value_distribution::param_type)
(discrete_distribution::param_type)
(piecewise_constant_distribution::param_type)
(piecewise_linear_distribution::param_type): Define operator!=.
* include/bits/uniform_int_dist.h
(uniform_int_distribution::param_type): Likewise.
* include/ext/random (beta_distribution::param_type)
(rice_distribution::param_type, nakagami_distribution::param_type)
(pareto_distribution::param_type, k_distribution::param_type)
(arcsine_distribution::param_type, hoyt_distribution::param_type)
(triangular_distribution::param_type)
(von_mises_distribution::param_type)
(hypergeometric_distribution::param_type)
(logistic_distribution::param_type)
(uniform_on_sphere_distribution::param_type)
(uniform_inside_sphere_distribution::param_type): Likewise.
* testsuite/26_numerics/random/bernoulli_distribution/cons/parms.cc:
Test construction with param_type.
* testsuite/26_numerics/random/binomial_distribution/cons/parms.cc:
Likewise.
* testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc:
Likewise.
* testsuite/26_numerics/random/chi_squared_distribution/cons/parms.cc:
Likewise.
* testsuite/26_numerics/random/exponential_distribution/cons/parms.cc:
Likewise.
* testsuite/26_numerics/random/extreme_value_distribution/cons/
parms.cc: Likewise.
* testsuite/26_numerics/random/fisher_f_distribution/cons/parms.cc:
Likewise.
* testsuite/26_numerics/random/gamma_distribution/cons/parms.cc:
Likewise.
* testsuite/26_numerics/random/geometric_distribution/cons/parms.cc:
Likewise.
* testsuite/26_numerics/random/lognormal_distribution/cons/parms.cc:
Likewise.
* testsuite/26_numerics/random/negative_binomial_distribution/cons/
parms.cc: Likewise.
* testsuite/26_numerics/random/normal_distribution/cons/parms.cc:
Likewise.
* testsuite/26_numerics/random/poisson_distribution/cons/parms.cc:
Likewise.
* testsuite/26_numerics/random/student_t_distribution/cons/parms.cc:
Likewise.
* testsuite/26_numerics/random/uniform_int_distribution/cons/parms.cc:
Likewise.
* testsuite/26_numerics/random/uniform_real_distribution/cons/parms.cc:
Likewise.
* testsuite/26_numerics/random/weibull_distribution/cons/parms.cc:
Likewise.
* testsuite/ext/random/arcsine_distribution/cons/parms.cc: Likewise.
* testsuite/ext/random/beta_distribution/cons/parms.cc: Likewise.
* testsuite/ext/random/hoyt_distribution/cons/parms.cc: Likewise.
* testsuite/ext/random/hypergeometric_distribution/cons/parms.cc:
Likewise.
* testsuite/ext/random/k_distribution/cons/parms.cc: Likewise.
* testsuite/ext/random/logistic_distribution/cons/parms.cc: Likewise.
* testsuite/ext/random/nakagami_distribution/cons/parms.cc: Likewise.
* testsuite/ext/random/normal_mv_distribution/cons/parms.cc: Likewise.
* testsuite/ext/random/pareto_distribution/cons/parms.cc: Likewise.
* testsuite/ext/random/rice_distribution/cons/parms.cc: Likewise.
* testsuite/ext/random/triangular_distribution/cons/parms.cc:
Likewise.
* testsuite/ext/random/uniform_inside_sphere_distribution/cons/
parms.cc: Likewise.
* testsuite/ext/random/von_mises_distribution/cons/parms.cc: Likewise.

From-SVN: r244722

34 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.h
libstdc++-v3/include/bits/uniform_int_dist.h
libstdc++-v3/include/ext/random
libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/cons/parms.cc
libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/cons/parms.cc
libstdc++-v3/testsuite/ext/random/arcsine_distribution/cons/parms.cc
libstdc++-v3/testsuite/ext/random/beta_distribution/cons/parms.cc
libstdc++-v3/testsuite/ext/random/hoyt_distribution/cons/parms.cc
libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/cons/parms.cc
libstdc++-v3/testsuite/ext/random/k_distribution/cons/parms.cc
libstdc++-v3/testsuite/ext/random/logistic_distribution/cons/parms.cc
libstdc++-v3/testsuite/ext/random/nakagami_distribution/cons/parms.cc
libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/parms.cc
libstdc++-v3/testsuite/ext/random/pareto_distribution/cons/parms.cc
libstdc++-v3/testsuite/ext/random/rice_distribution/cons/parms.cc
libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/parms.cc
libstdc++-v3/testsuite/ext/random/uniform_inside_sphere_distribution/cons/parms.cc
libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/parms.cc

index 5725179ac4217bf7cea08575e8edbcdd352b7b48..37edf6e080a4d4996b19e381445e0e75fc2088e5 100644 (file)
@@ -1,5 +1,84 @@
 2017-01-20  Jonathan Wakely  <jwakely@redhat.com>
 
+       PR libstdc++/69240
+       * include/bits/random.h (uniform_real_distribution::param_type)
+       (normal_distribution::param_type, lognormal_distribution::param_type)
+       (gamma_distribution::param_type, chi_squared_distribution::param_type)
+       (cauchy_distribution::param_type, fisher_f_distribution::param_type)
+       (student_t_distribution::param_type)
+       (bernoulli_distribution::param_type, binomial_distribution::param_type)
+       (geometric_distribution::param_type)
+       (negative_binomial_distribution::param_type)
+       (poisson_distribution::param_type)
+       (exponential_distribution::param_type)
+       (weibull_distribution::param_type)
+       (extreme_value_distribution::param_type)
+       (discrete_distribution::param_type)
+       (piecewise_constant_distribution::param_type)
+       (piecewise_linear_distribution::param_type): Define operator!=.
+       * include/bits/uniform_int_dist.h
+       (uniform_int_distribution::param_type): Likewise.
+       * include/ext/random (beta_distribution::param_type)
+       (rice_distribution::param_type, nakagami_distribution::param_type)
+       (pareto_distribution::param_type, k_distribution::param_type)
+       (arcsine_distribution::param_type, hoyt_distribution::param_type)
+       (triangular_distribution::param_type)
+       (von_mises_distribution::param_type)
+       (hypergeometric_distribution::param_type)
+       (logistic_distribution::param_type)
+       (uniform_on_sphere_distribution::param_type)
+       (uniform_inside_sphere_distribution::param_type): Likewise.
+       * testsuite/26_numerics/random/bernoulli_distribution/cons/parms.cc:
+       Test construction with param_type.
+       * testsuite/26_numerics/random/binomial_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/26_numerics/random/chi_squared_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/26_numerics/random/exponential_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/26_numerics/random/extreme_value_distribution/cons/
+       parms.cc: Likewise.
+       * testsuite/26_numerics/random/fisher_f_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/26_numerics/random/gamma_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/26_numerics/random/geometric_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/26_numerics/random/lognormal_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/26_numerics/random/negative_binomial_distribution/cons/
+       parms.cc: Likewise.
+       * testsuite/26_numerics/random/normal_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/26_numerics/random/poisson_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/26_numerics/random/student_t_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/26_numerics/random/uniform_int_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/26_numerics/random/uniform_real_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/26_numerics/random/weibull_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/ext/random/arcsine_distribution/cons/parms.cc: Likewise.
+       * testsuite/ext/random/beta_distribution/cons/parms.cc: Likewise.
+       * testsuite/ext/random/hoyt_distribution/cons/parms.cc: Likewise.
+       * testsuite/ext/random/hypergeometric_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/ext/random/k_distribution/cons/parms.cc: Likewise.
+       * testsuite/ext/random/logistic_distribution/cons/parms.cc: Likewise.
+       * testsuite/ext/random/nakagami_distribution/cons/parms.cc: Likewise.
+       * testsuite/ext/random/normal_mv_distribution/cons/parms.cc: Likewise.
+       * testsuite/ext/random/pareto_distribution/cons/parms.cc: Likewise.
+       * testsuite/ext/random/rice_distribution/cons/parms.cc: Likewise.
+       * testsuite/ext/random/triangular_distribution/cons/parms.cc:
+       Likewise.
+       * testsuite/ext/random/uniform_inside_sphere_distribution/cons/
+       parms.cc: Likewise.
+       * testsuite/ext/random/von_mises_distribution/cons/parms.cc: Likewise.
+
        PR libstdc++/72792
        * include/bits/alloc_traits.h (__allocator_traits_base::__diff_type)
        (__allocator_traits_base::__size_type): Remove.
index 2586cbc5b3dfaf1744c97dafb0da2ca0a1e468e7..d39cc3e0666e8a70002088a73572b36675393419 100644 (file)
@@ -1707,6 +1707,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -1732,6 +1733,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        _RealType _M_a;
        _RealType _M_b;
@@ -1925,6 +1930,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -1951,6 +1957,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        { return (__p1._M_mean == __p2._M_mean
                  && __p1._M_stddev == __p2._M_stddev); }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        _RealType _M_mean;
        _RealType _M_stddev;
@@ -2138,6 +2148,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -2161,6 +2172,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_m == __p2._M_m && __p1._M_s == __p2._M_s; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        _RealType _M_m;
        _RealType _M_s;
@@ -2342,6 +2357,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -2370,6 +2386,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        { return (__p1._M_alpha == __p2._M_alpha
                  && __p1._M_beta == __p2._M_beta); }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        void
        _M_initialize();
@@ -2559,6 +2579,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -2577,6 +2598,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_n == __p2._M_n; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        _RealType _M_n;
       };
@@ -2769,6 +2794,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -2792,6 +2818,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        _RealType _M_a;
        _RealType _M_b;
@@ -2970,6 +3000,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -2993,6 +3024,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_m == __p2._M_m && __p1._M_n == __p2._M_n; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        _RealType _M_m;
        _RealType _M_n;
@@ -3194,6 +3229,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -3212,6 +3248,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_n == __p2._M_n; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        _RealType _M_n;
       };
@@ -3409,6 +3449,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   public:
     /** The type of the range of the distribution. */
     typedef bool result_type;
+
     /** Parameter type. */
     struct param_type
     {
@@ -3429,6 +3470,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       operator==(const param_type& __p1, const param_type& __p2)
       { return __p1._M_p == __p2._M_p; }
 
+      friend bool
+      operator!=(const param_type& __p1, const param_type& __p2)
+      { return !(__p1 == __p2); }
+
     private:
       double _M_p;
     };
@@ -3617,6 +3662,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _IntType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -3645,6 +3691,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_t == __p2._M_t && __p1._M_p == __p2._M_p; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        void
        _M_initialize();
@@ -3848,6 +3898,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _IntType  result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -3870,6 +3921,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_p == __p2._M_p; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        void
        _M_initialize()
@@ -4048,6 +4103,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _IntType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -4072,6 +4128,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_k == __p2._M_k && __p1._M_p == __p2._M_p; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        _IntType _M_k;
        double _M_p;
@@ -4270,6 +4330,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _IntType  result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -4292,6 +4353,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_mean == __p2._M_mean; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        // Hosts either log(mean) or the threshold of the simple method.
        void
@@ -4486,6 +4551,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -4506,6 +4572,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_lambda == __p2._M_lambda; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        _RealType _M_lambda;
       };
@@ -4688,6 +4758,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -4711,6 +4782,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        _RealType _M_a;
        _RealType _M_b;
@@ -4891,6 +4966,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -4914,6 +4990,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        _RealType _M_a;
        _RealType _M_b;
@@ -5091,6 +5171,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _IntType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -5127,6 +5208,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_prob == __p2._M_prob; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        void
        _M_initialize();
@@ -5321,6 +5406,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -5368,6 +5454,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        void
        _M_initialize();
@@ -5588,6 +5678,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -5633,8 +5724,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
        friend bool
        operator==(const param_type& __p1, const param_type& __p2)
-       { return (__p1._M_int == __p2._M_int
-                 && __p1._M_den == __p2._M_den); }
+       { return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; }
+
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
 
       private:
        void
index a226a9ec541dc0080c6986cd73e9805ed00e2f57..af7ac14bccfe30120df85516d56bc3ff1b8f7033 100644 (file)
@@ -91,6 +91,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        _IntType _M_a;
        _IntType _M_b;
@@ -363,6 +367,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
            *__f++ = __uctype(__urng()) - __urngmin + __param.a();
       }
 
+  // operator!= and operator<< and operator>> are defined in <bits/random.h>
+
 _GLIBCXX_END_NAMESPACE_VERSION
 } // namespace std
 
index 6a3aaaca33dada08e8e6d642ffe2f3a5a9262187..d93757b08dd70461fd9ee4cc1dad6f8dc3d4ea48 100644 (file)
@@ -404,6 +404,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -432,6 +433,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        { return (__p1._M_alpha == __p2._M_alpha
                  && __p1._M_beta == __p2._M_beta); }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        void
        _M_initialize();
@@ -710,6 +715,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_mean == __p2._M_mean && __p1._M_t == __p2._M_t; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        template <typename _InputIterator1, typename _InputIterator2>
          void _M_init_full(_InputIterator1 __meanbegin,
@@ -942,6 +951,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -965,8 +975,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
        friend bool
        operator==(const param_type& __p1, const param_type& __p2)
-       { return __p1._M_nu == __p2._M_nu
-             && __p1._M_sigma == __p2._M_sigma; }
+       { return __p1._M_nu == __p2._M_nu && __p1._M_sigma == __p2._M_sigma; }
+
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
 
       private:
        void _M_initialize();
@@ -1184,6 +1197,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -1207,8 +1221,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
        friend bool
        operator==(const param_type& __p1, const param_type& __p2)
-       { return __p1._M_mu == __p2._M_mu
-             && __p1._M_omega == __p2._M_omega; }
+       { return __p1._M_mu == __p2._M_mu && __p1._M_omega == __p2._M_omega; }
+
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
 
       private:
        void _M_initialize();
@@ -1417,6 +1434,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -1442,6 +1460,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_alpha == __p2._M_alpha && __p1._M_mu == __p2._M_mu; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        void _M_initialize();
 
@@ -1651,6 +1673,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -1680,9 +1703,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
        friend bool
        operator==(const param_type& __p1, const param_type& __p2)
-       { return __p1._M_lambda == __p2._M_lambda
+       {
+         return __p1._M_lambda == __p2._M_lambda
              && __p1._M_mu == __p2._M_mu
-             && __p1._M_nu == __p2._M_nu; }
+             && __p1._M_nu == __p2._M_nu;
+       }
+
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
 
       private:
        void _M_initialize();
@@ -1890,6 +1919,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -1914,6 +1944,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        void _M_initialize();
 
@@ -2126,6 +2160,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -2149,8 +2184,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
        friend bool
        operator==(const param_type& __p1, const param_type& __p2)
-       { return __p1._M_q == __p2._M_q
-             && __p1._M_omega == __p2._M_omega; }
+       { return __p1._M_q == __p2._M_q && __p1._M_omega == __p2._M_omega; }
+
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
 
       private:
        void _M_initialize();
@@ -2359,6 +2397,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -2393,8 +2432,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
        friend bool
        operator==(const param_type& __p1, const param_type& __p2)
-       { return (__p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b
-                 && __p1._M_c == __p2._M_c); }
+       {
+         return (__p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b
+                 && __p1._M_c == __p2._M_c);
+       }
+
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
 
       private:
 
@@ -2646,8 +2691,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
        friend bool
        operator==(const param_type& __p1, const param_type& __p2)
-       { return (__p1._M_mu == __p2._M_mu
-                 && __p1._M_kappa == __p2._M_kappa); }
+       { return __p1._M_mu == __p2._M_mu && __p1._M_kappa == __p2._M_kappa; }
+
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
 
       private:
        _RealType _M_mu;
@@ -2889,6 +2937,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
              && (__p1._M_K == __p2._M_K)
              && (__p1._M_n == __p2._M_n); }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
 
        result_type _M_N;
@@ -3111,6 +3163,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -3133,8 +3186,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
        friend bool
        operator==(const param_type& __p1, const param_type& __p2)
-       { return __p1._M_a == __p2._M_a
-             && __p1._M_b == __p2._M_b; }
+       { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
+
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
 
       private:
        void _M_initialize();
@@ -3317,6 +3373,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef std::array<_RealType, _Dimen> result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -3325,8 +3382,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        { }
 
        friend bool
-       operator==(const param_type& __p1, const param_type& __p2)
+       operator==(const param_type&, const param_type&)
        { return true; }
+
+       friend bool
+       operator!=(const param_type&, const param_type&)
+       { return false; }
       };
 
       /**
@@ -3530,6 +3591,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        operator==(const param_type& __p1, const param_type& __p2)
        { return __p1._M_radius == __p2._M_radius; }
 
+       friend bool
+       operator!=(const param_type& __p1, const param_type& __p2)
+       { return !(__p1 == __p2); }
+
       private:
        _RealType _M_radius;
       };
index b1b246d838e56a647d9a637a06add9dbad1197c9..34657e1149192d484540bf3a42fde4b58f793a2f 100644 (file)
@@ -35,8 +35,20 @@ test01()
   VERIFY( u.max() == std::numeric_limits<bool>::max() );
 }
 
+void
+test02()
+{
+  using param_type = std::bernoulli_distribution::param_type;
+  const param_type p(0.75);
+  std::bernoulli_distribution u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  VERIFY( u.min() == std::numeric_limits<bool>::min() );
+  VERIFY( u.max() == std::numeric_limits<bool>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 12747f23a69c2acee6104452cc4988747a88d7fe..74f0ea6e428121347d06051b3dd735ce707dcdab 100644 (file)
@@ -36,8 +36,20 @@ test01()
   VERIFY( u.max() == u.t() );
 }
 
+void
+test02()
+{
+  using param_type = std::binomial_distribution<>::param_type;
+  const param_type p(3, 0.75);
+  std::binomial_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  VERIFY( u.min() == 0 );
+  VERIFY( u.max() == u.t() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 63e7efe2a8b0b6cd677154e50eb82f1970e29726..a28819d71a4784a93bd965d5fe3d4dbdbe26538b 100644 (file)
@@ -37,8 +37,21 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  using param_type = std::cauchy_distribution<>::param_type;
+  const param_type p(5.0, 2.0);
+  std::cauchy_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef std::cauchy_distribution<>::result_type result_type;
+  VERIFY( u.min() == std::numeric_limits<result_type>::lowest() );
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index b6d26e2657077a848f9cd2aadf3cee4265ac7f7b..ad1b079a8ea583acf8d94d8d2f33e791ce5ec04e 100644 (file)
@@ -36,8 +36,21 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  using param_type = std::chi_squared_distribution<>::param_type;
+  const param_type p(1.5);
+  std::chi_squared_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef std::chi_squared_distribution<>::result_type result_type;
+  VERIFY( u.min() == 0.0 );
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 94d61e1febe2058f9c856fc6de66849ff05f58ea..38e6c8d4aaa0ff8a8922e28a73e131d7f97635d5 100644 (file)
@@ -36,8 +36,21 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  using param_type = std::exponential_distribution<>::param_type;
+  const param_type p(0.5);
+  std::exponential_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef std::exponential_distribution<>::result_type result_type;
+  VERIFY( u.min() == 0.0 );
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 8dc1daf892036e788f2ea2023bb57c4c579ca2ab..019cb213cac629ada7ae815484706ca14c8d76e9 100644 (file)
@@ -37,8 +37,21 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  using param_type = std::extreme_value_distribution<>::param_type;
+  const param_type p(5.0, 2.0);
+  std::extreme_value_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef std::extreme_value_distribution<>::result_type result_type;
+  VERIFY( u.min() == std::numeric_limits<result_type>::lowest() );
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 2a0cf71703de8152b4b894ab4e4c3cef11db8244..969b3d1504518281c4213fc493c842215f5ecfb2 100644 (file)
@@ -37,8 +37,21 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  using param_type = std::fisher_f_distribution<>::param_type;
+  const param_type p(0.75);
+  std::fisher_f_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef std::fisher_f_distribution<>::result_type result_type;
+  VERIFY( u.min() == 0.0 );
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index ec291cfba6d019068d2a31245edebda14ca1bf63..589fd891c0defab12e8dca67a885a4770d5ca5b4 100644 (file)
@@ -37,8 +37,20 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  using param_type = std::gamma_distribution<>::param_type;
+  const param_type p(1.5, 3.0);
+  std::gamma_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef std::gamma_distribution<>::result_type result_type;
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 618b2bf627ac830beee4c98e04257fea2e3fabd0..f10c46f7e506c54bb8a46b602cb334f2c561025f 100644 (file)
@@ -36,8 +36,20 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  using param_type = std::geometric_distribution<>::param_type;
+  const param_type p(0.75);
+  std::geometric_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef std::geometric_distribution<>::result_type result_type;
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index fed2756fb658375713867f178048d120df8529ac..6548f60fce4d6786a492c8919a5dc913be253106 100644 (file)
@@ -37,8 +37,21 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  using param_type = std::lognormal_distribution<>::param_type;
+  const param_type p(5.0, 2.0);
+  std::lognormal_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef std::lognormal_distribution<>::result_type result_type;
+  VERIFY( u.min() == 0.0 );
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index c94d4216b261f404a7d7ee549a8ec4c78795d6ab..46e45f0bd23efa94ff6568c87ea2fa06ab81ae7e 100644 (file)
@@ -37,8 +37,21 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  using param_type = std::negative_binomial_distribution<>::param_type;
+  const param_type p(3, 0.75);
+  std::negative_binomial_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef std::negative_binomial_distribution<>::result_type result_type;
+  VERIFY( u.min() == 0 );
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 04a24f8c418aa1f37a64b3cba0bcc74cb4ea7d83..770b51f9e4f66bee7c652d0de8406d4ab7ad34a2 100644 (file)
@@ -37,8 +37,21 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  using param_type = std::normal_distribution<>::param_type;
+  const param_type p(5.0, 2.0);
+  std::normal_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef std::normal_distribution<>::result_type result_type;
+  VERIFY( u.min() == std::numeric_limits<result_type>::lowest() );
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 0881956259c19eb1147ab90e8d2941052624f9fb..e91e9f6051466fd673b4b5a5c6e960a97275f9d7 100644 (file)
@@ -36,8 +36,20 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  using param_type = std::poisson_distribution<>::param_type;
+  const param_type p(5.0);
+  std::poisson_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef std::poisson_distribution<>::result_type result_type;
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 28e025cd4a357ba026d11b07a810d41e58a56a1d..5ff8b7d495e2476abc2d031ef3b97ba9f5d65f5b 100644 (file)
@@ -36,8 +36,21 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  using param_type = std::student_t_distribution<>::param_type;
+  const param_type p(1.5);
+  std::student_t_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef std::student_t_distribution<>::result_type result_type;
+  VERIFY( u.min() == std::numeric_limits<result_type>::lowest() );
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index d31152f282eaffe4da9ddcf71c8509ec34ad82ab..1a33918a67f5a034a943848b825cc39e0c8e2419 100644 (file)
@@ -36,8 +36,20 @@ test01()
   VERIFY( u.max() == 20 );
 }
 
+void
+test02()
+{
+  using param_type = std::uniform_int_distribution<int>::param_type;
+  const param_type p(1, 20);
+  std::uniform_int_distribution<int> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  VERIFY( u.min() == 1 );
+  VERIFY( u.max() == 20 );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 212978b45e6ab3e71af12225ab67e93f34a6f73c..428638912a6157322ad3497a92f7c5f62821f344 100644 (file)
@@ -36,8 +36,20 @@ test01()
   VERIFY( u.max() == 5.0 );
 }
 
+void
+test02()
+{
+  using param_type = std::uniform_real_distribution<double>::param_type;
+  const param_type p(-5.0, 5.0);
+  std::uniform_real_distribution<double> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  VERIFY( u.min() == -5.0 );
+  VERIFY( u.max() == 5.0 );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index ba9d5c2efd08cb8688ec8921c236a5e26e310eda..c3638cb0e466133eec4a8d39f8208db321c795a0 100644 (file)
@@ -37,8 +37,20 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  using param_type = std::weibull_distribution<>::param_type;
+  const param_type p(2.0, 3.5);
+  std::weibull_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef std::weibull_distribution<>::result_type result_type;
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 3f17deaee2a45e1a7c21344c375564da9fc96295..9c5e8b6a5f1411bb2e85ed0d5fd4858ed21ecffb 100644 (file)
@@ -33,9 +33,20 @@ test01()
   VERIFY( u.max() == 3.0 );
 }
 
-int
-main()
+void
+test02()
+{
+  using param_type = __gnu_cxx::arcsine_distribution<>::param_type;
+  const param_type p(-1.5, 3.0);
+  __gnu_cxx::arcsine_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  VERIFY( u.min() == -1.5 );
+  VERIFY( u.max() == 3.0 );
+}
+
+int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 70709a02c869e119bb2551f6de58bf7fc9a62906..a9ea0332c613cb150f675171185295c168b4b7c8 100644 (file)
@@ -34,8 +34,20 @@ test01()
   VERIFY( u.max() == 1.0 );
 }
 
+void
+test02()
+{
+  using param_type = __gnu_cxx::beta_distribution<>::param_type;
+  const param_type p(1.5, 3.0);
+  __gnu_cxx::beta_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  VERIFY( u.min() == 0.0 );
+  VERIFY( u.max() == 1.0 );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 6ecc5f821dea522130754bc7affc8a8e0161cc38..61149ea5b6f5b1d0021e726fa619d52b2ab40777 100644 (file)
@@ -34,9 +34,20 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
-int
-main()
+void
+test02()
+{
+  using param_type = __gnu_cxx::hoyt_distribution<>::param_type;
+  const param_type p(0.05, 3.0);
+  __gnu_cxx::hoyt_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef __gnu_cxx::hoyt_distribution<>::result_type result_type;
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
+int main()
 {
   test01();
-  return 0;
+  test02();
 }
index e8c12e647d1bc7c3300ae60f2bd6b5f61e8c3fed..d8cb70a8a9105b280f86340c42d2186a01885a0d 100644 (file)
@@ -37,9 +37,20 @@ test01()
   VERIFY( u.max() == 2 );
 }
 
-int
-main()
+void
+test02()
+{
+  using param_type = __gnu_cxx::hypergeometric_distribution<>::param_type;
+  const param_type p(15, 3, 2);
+  __gnu_cxx::hypergeometric_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  VERIFY( u.min() == 0 );
+  VERIFY( u.max() == 2 );
+}
+
+int main()
 {
   test01();
-  return 0;
+  test02();
 }
index d73871167f7e1ef97cd90321e51b921577cc9eeb..19aa8ffe6759f60a5580d65c6aec49385182ca37 100644 (file)
@@ -38,9 +38,20 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
-int
-main()
+void
+test02()
+{
+  using param_type = __gnu_cxx::k_distribution<>::param_type;
+  const param_type p(2.0, 1.5, 3.0);
+  __gnu_cxx::k_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef __gnu_cxx::k_distribution<>::result_type result_type;
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
+int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 35d602ff64e6519200f9f725cad55b7bb28af43a..1ec3bf3df23b7367b96a806b8f557ab8de8804b0 100644 (file)
@@ -38,9 +38,22 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
-int
-main()
+void
+test02()
+{
+  using param_type = __gnu_cxx::logistic_distribution<>::param_type;
+  const param_type p(1.5, 3.0);
+  __gnu_cxx::logistic_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+
+  typedef __gnu_cxx::logistic_distribution<>::result_type result_type;
+  VERIFY( u.min() == -std::numeric_limits<result_type>::max() );
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
+int main()
 {
   test01();
-  return 0;
+  test02();
 }
index adb7fc66d1188aa5246f252a810f540c52acf3fc..f2d187fa0edbfdd7761a9eea5118b2f1ea65cc03 100644 (file)
@@ -37,9 +37,20 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
-int
-main()
+void
+test02()
+{
+  using param_type = __gnu_cxx::nakagami_distribution<>::param_type;
+  const param_type p(1.5, 3.0);
+  __gnu_cxx::nakagami_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef __gnu_cxx::nakagami_distribution<>::result_type result_type;
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
+int main()
 {
   test01();
-  return 0;
+  test02();
 }
index b4b0ff8725b30a8844e269bb7c88f6ddf0ce1506..35ba4c46f591dd32655230a2fd40307b024e9be1 100644 (file)
@@ -40,8 +40,23 @@ test01()
   VERIFY( u.max()[1] == std::numeric_limits<result_type::value_type>::max() );
 }
 
+void
+test02()
+{
+  using param_type = __gnu_cxx::normal_mv_distribution<2>::param_type;
+  const param_type p({5.0, 4.0}, {4.0, 9.0});
+  __gnu_cxx::normal_mv_distribution<2> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef __gnu_cxx::normal_mv_distribution<2>::result_type result_type;
+  VERIFY( u.min()[0] == std::numeric_limits<result_type::value_type>::lowest() );
+  VERIFY( u.max()[0] == std::numeric_limits<result_type::value_type>::max() );
+  VERIFY( u.min()[1] == std::numeric_limits<result_type::value_type>::lowest() );
+  VERIFY( u.max()[1] == std::numeric_limits<result_type::value_type>::max() );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 5a24658eed6ac2b5077cd02d1e93d7c380405ff6..7bbc2f0a86c7dd636d9a09af44b1fbaaf83857a7 100644 (file)
@@ -37,9 +37,20 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
-int
-main()
+void
+test02()
+{
+  using param_type = __gnu_cxx::pareto_distribution<>::param_type;
+  const param_type p(1.5, 3.0);
+  __gnu_cxx::pareto_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef __gnu_cxx::pareto_distribution<>::result_type result_type;
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
+int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 04e34f352e4e711823254df0eedc013fd658c48f..d8cbcda93f7f30b379f3f0dbdf555122302687b8 100644 (file)
@@ -37,9 +37,20 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
-int
-main()
+void
+test02()
+{
+  using param_type = __gnu_cxx::rice_distribution<>::param_type;
+  const param_type p(1.5, 3.0);
+  __gnu_cxx::rice_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef __gnu_cxx::rice_distribution<>::result_type result_type;
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
+int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 1a6c2b04a22e35ed73ddf3b16cb4678c339d1a3d..1c71f6cbda11753ccd9eca72c6330ed5126c3cf8 100644 (file)
@@ -35,8 +35,20 @@ test01()
   VERIFY( u.max() == 3.5 );
 }
 
+void
+test02()
+{
+  using param_type = __gnu_cxx::triangular_distribution<>::param_type;
+  const param_type p(1.5, 3.0, 3.5);
+  __gnu_cxx::triangular_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  VERIFY( u.min() == 1.5 );
+  VERIFY( u.max() == 3.5 );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
index f33626593aed699b294fdb53b95c33146fd720d0..5752691e1f21a79db8f9bc738aa646bf347ff55d 100644 (file)
@@ -27,8 +27,6 @@
 void
 test01()
 {
-  bool test [[gnu::unused]] = true;
-
   __gnu_cxx::uniform_inside_sphere_distribution<2> u(1.5);
   VERIFY( u.radius() == 1.5 );
 
@@ -36,9 +34,19 @@ test01()
   VERIFY( v.radius() == 3.0 );
 }
 
-int
-main()
+void
+test02()
+{
+  using param_type
+    = __gnu_cxx::uniform_inside_sphere_distribution<2>::param_type;
+  const param_type p(1.5);
+  __gnu_cxx::uniform_inside_sphere_distribution<2> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+}
+
+int main()
 {
   test01();
-  return 0;
+  test02();
 }
index 79e44331334818f98c8ba5a3a8e5cbc5240a99c6..0cfe3ded700ac749cb395827a90848b5da3015b8 100644 (file)
@@ -34,8 +34,20 @@ test01()
   VERIFY( u.max() == __gnu_cxx::__math_constants<double>::__pi );
 }
 
+void
+test02()
+{
+  using param_type = __gnu_cxx::von_mises_distribution<>::param_type;
+  const param_type p(1.5, 3.0);
+  __gnu_cxx::von_mises_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  VERIFY( u.min() == -__gnu_cxx::__math_constants<double>::__pi );
+  VERIFY( u.max() == __gnu_cxx::__math_constants<double>::__pi );
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }