Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: third_party/mt19937ar/mt19937ar.h

Issue 1551483002: Switch to standard integer types in third_party/mt19937ar/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/mt19937ar/mt19937ar.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 A C-program for MT19937, with initialization improved 2002/1/26. 2 A C-program for MT19937, with initialization improved 2002/1/26.
3 Coded by Takuji Nishimura and Makoto Matsumoto. 3 Coded by Takuji Nishimura and Makoto Matsumoto.
4 4
5 Before using, initialize the state by using init_genrand(seed) 5 Before using, initialize the state by using init_genrand(seed)
6 or init_by_array(init_key, key_length). 6 or init_by_array(init_key, key_length).
7 7
8 Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, 8 Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
9 All rights reserved. 9 All rights reserved.
10 10
(...skipping 26 matching lines...) Expand all
37 37
38 38
39 Any feedback is very welcome. 39 Any feedback is very welcome.
40 http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html 40 http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
41 email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space) 41 email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
42 */ 42 */
43 43
44 #ifndef THIRD_PARTY_MT19937AR_MT19937AR_H_ 44 #ifndef THIRD_PARTY_MT19937AR_MT19937AR_H_
45 #define THIRD_PARTY_MT19937AR_MT19937AR_H_ 45 #define THIRD_PARTY_MT19937AR_MT19937AR_H_
46 46
47 #include <stdint.h>
48
47 #include <vector> 49 #include <vector>
48 50
49 #include "base/basictypes.h"
50
51 class MersenneTwister { 51 class MersenneTwister {
52 public: 52 public:
53 MersenneTwister(); 53 MersenneTwister();
54 ~MersenneTwister(); 54 ~MersenneTwister();
55 55
56 void init_genrand(uint32 s); 56 void init_genrand(uint32_t s);
57 void init_by_array(uint32 init_key[], int key_length); 57 void init_by_array(uint32_t init_key[], int key_length);
58 uint32 genrand_int32(void); 58 uint32_t genrand_int32(void);
59 59
60 private: 60 private:
61 std::vector<uint32> mt; /* the array for the state vector */ 61 std::vector<uint32_t> mt; /* the array for the state vector */
62 int mti; /* mti==N+1 means mt[N] is not initialized */ 62 int mti; /* mti==N+1 means mt[N] is not initialized */
63 }; 63 };
64 64
65 #endif // THIRD_PARTY_MT19937AR_MT19937AR_H_ 65 #endif // THIRD_PARTY_MT19937AR_MT19937AR_H_
OLDNEW
« no previous file with comments | « no previous file | third_party/mt19937ar/mt19937ar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698