Merge branch 'master' of https://github.com/moloch--/untwister into moloch

This commit is contained in:
AltF4 committed 2014-12-12 16:16:41 -07:00
commit 16c3e86deb
3 files changed
+30 -19

No files matched your search

+9 -8
View File
@@ -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
View File
@@ -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
View File
@@ -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