• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // <random>
11 
12 // template<class IntType = int>
13 // class binomial_distribution
14 
15 // bool operator=(const binomial_distribution& x,
16 //                const binomial_distribution& y);
17 // bool operator!(const binomial_distribution& x,
18 //                const binomial_distribution& y);
19 
20 #include <random>
21 #include <cassert>
22 
main()23 int main()
24 {
25     {
26         typedef std::binomial_distribution<> D;
27         D d1(3, .25);
28         D d2(3, .25);
29         assert(d1 == d2);
30     }
31     {
32         typedef std::binomial_distribution<> D;
33         D d1(3, .28);
34         D d2(3, .25);
35         assert(d1 != d2);
36     }
37     {
38         typedef std::binomial_distribution<> D;
39         D d1(3, .25);
40         D d2(4, .25);
41         assert(d1 != d2);
42     }
43 }
44