Rebase.
[official-gcc.git] / libstdc++-v3 / testsuite / ext / random / hypergeometric_distribution / pr60037.cc
blobd3088a6ec38557464844f4b898e45a2dadf7f8ec
1 // { dg-options "-std=gnu++11 -O0" }
2 // { dg-require-cstdint "" }
3 // { dg-require-cmath "" }
5 #include <ext/random>
6 #include <functional>
8 void
9 hyperplot(unsigned int N, unsigned int K, unsigned int n)
11 std::mt19937 re; // the default engine
12 __gnu_cxx::hypergeometric_distribution<> hd(N, K, n);
13 auto gen = std::bind(hd, re);
14 gen();
17 int
18 main()
20 hyperplot(15, 3, 2);
21 hyperplot(500, 50, 30);
22 hyperplot(100, 20, 5);