mirror of
https://github.com/BishopFox/untwister.git
synced 2026-11-07 10:35:58 -10:00
Merge branch 'master' of https://github.com/moloch--/untwister into moloch
This commit is contained in:
commit
16c3e86deb
3 files changed
+30
-19
No files matched your search
+9
-8
@@ -10,13 +10,14 @@
|
||||
Ruby::Ruby()
|
||||
{
|
||||
seedValue = 0;
|
||||
mt = new MT;
|
||||
init_genrand(mt, seedValue);
|
||||
m_mt = new MT;
|
||||
init_genrand(m_mt, seedValue);
|
||||
}
|
||||
|
||||
Ruby::~Ruby()
|
||||
Ruby::~Ruby()
|
||||
{
|
||||
delete mt;
|
||||
delete m_mt;
|
||||
m_mt = NULL;
|
||||
}
|
||||
|
||||
const std::string Ruby::getName()
|
||||
@@ -26,10 +27,10 @@ const std::string Ruby::getName()
|
||||
|
||||
void Ruby::seed(uint32_t value)
|
||||
{
|
||||
delete mt;
|
||||
mt = new MT;
|
||||
delete m_mt;
|
||||
m_mt = new MT;
|
||||
seedValue = value;
|
||||
init_genrand(mt, value);
|
||||
init_genrand(m_mt, value);
|
||||
}
|
||||
|
||||
uint32_t Ruby::getSeed()
|
||||
@@ -39,7 +40,7 @@ uint32_t Ruby::getSeed()
|
||||
|
||||
uint32_t Ruby::random()
|
||||
{
|
||||
return genrand_int32(mt);
|
||||
return genrand_int32(m_mt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ private:
|
||||
void next_state(struct MT *mt);
|
||||
uint32_t genrand_int32(struct MT *mt);
|
||||
|
||||
MT *mt;
|
||||
MT *m_mt;
|
||||
uint32_t seedValue;
|
||||
};
|
||||
|
||||
|
||||
+20
-10
@@ -1,10 +1,20 @@
|
||||
3486555978
|
||||
3110953661
|
||||
1886093297
|
||||
3798442133
|
||||
4240579641
|
||||
1803353025
|
||||
3808769883
|
||||
4070703956
|
||||
2713382732
|
||||
918155256
|
||||
292616681
|
||||
1638893262
|
||||
255706927
|
||||
995816787
|
||||
588263094
|
||||
1540293802
|
||||
343418821
|
||||
903681492
|
||||
898530248
|
||||
1459533395
|
||||
276971287
|
||||
2009154155
|
||||
53369804
|
||||
1490425251
|
||||
552672860
|
||||
21619323
|
||||
1699833725
|
||||
664174788
|
||||
790840026
|
||||
1896536826
|
||||
Reference in new issue
Block a user