-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboost_math.cpp
More file actions
38 lines (31 loc) · 799 Bytes
/
boost_math.cpp
File metadata and controls
38 lines (31 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* =====================================================================================
*
* Filename: test_boost.cpp
*
* Description: ylj
*
* Version: 1.0
* Created: 08/12/2011 01:59:30 PM
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
* Company:
*
* =====================================================================================
*/
#include <iostream>
#include "boost/random.hpp"
int main (int argc ,char** argv)
{
const boost::mt19937 engine;
const boost::uniform_int<> dist(1,100);
boost::variate_generator<const boost::mt19937,const boost::uniform_int<>> const myrandom(engine,dist);
for(int i=0;i<10;i++)
{
int j=myrandom();
//std::cout<<myrandom()<<std::endl;
}
return 0;
}