1 // { dg-options "-std=gnu++11 -O0" }
2 // { dg-require-cstdint "" }
3 // { dg-require-cmath "" }
4 
5 #include <ext/random>
6 #include <functional>
7 
8 void
hyperplot(unsigned int N,unsigned int K,unsigned int n)9 hyperplot(unsigned int N, unsigned int K, unsigned int n)
10 {
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();
15 }
16 
17 int
main()18 main()
19 {
20   hyperplot(15, 3, 2);
21   hyperplot(500, 50, 30);
22   hyperplot(100, 20, 5);
23 }
24