NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
i
l
m
n
o
p
q
r
s
t
u
v
Enumerations
+
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
u
v
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
w
+
Typedefs
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
+
Enumerator
a
d
e
f
g
i
k
l
m
n
p
r
s
u
w
+
Related Functions
b
c
d
f
i
k
l
n
o
p
s
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
k
l
m
n
p
r
s
u
v
w
+
Functions
c
f
h
m
r
s
u
w
+
Variables
a
c
d
g
k
l
n
p
r
s
Typedefs
+
Macros
b
d
e
l
m
n
p
r
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
random.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
random.hpp
"
27
#include <boost/thread/tss.hpp>
28
29
namespace
nfd
{
30
31
static
boost::thread_specific_ptr<boost::random::mt19937>
g_rng
;
32
33
boost::random::mt19937&
34
getGlobalRng
()
35
{
36
if
(g_rng.get() ==
nullptr
) {
37
g_rng.reset(
new
boost::random::mt19937());
38
}
39
return
*
g_rng
;
40
}
41
42
void
43
resetGlobalRng
()
44
{
45
g_rng.reset();
46
}
47
48
}
// namespace nfd
random.hpp
nfd::g_rng
static boost::thread_specific_ptr< boost::random::mt19937 > g_rng
Definition:
random.cpp:31
nfd::resetGlobalRng
void resetGlobalRng()
Definition:
random.cpp:43
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::getGlobalRng
boost::random::mt19937 & getGlobalRng()
Definition:
random.cpp:34
ndnSIM
NFD
core
random.cpp
Generated on Sat Nov 12 2016 16:02:53 for ndnSIM by
1.8.12