diff --git a/doc/manual/source/random-variables.rst b/doc/manual/source/random-variables.rst index aeafd07d3..ae36fe7cf 100644 --- a/doc/manual/source/random-variables.rst +++ b/doc/manual/source/random-variables.rst @@ -28,8 +28,8 @@ Quick Overview * to obtain randomness across multiple simulation runs, you must either set the seed differently or set the run number differently. To set a seed, call - :cpp:func:`ns3::SeedManager::SetSeed` at the beginning of the program; to set - a run number with the same seed, call :cpp:func:`ns3::SeedManager::SetRun` at + :cpp:func:`ns3::RngSeedManager::SetSeed` at the beginning of the program; to set + a run number with the same seed, call :cpp:func:`ns3::RngSeedManager::SetRun` at the beginning of the program; see :ref:`seeding-and-independent-replications`. * each RandomVariableStream used in |ns3| has a virtual random number generator @@ -120,12 +120,12 @@ so as to compute statistics on a large number of independent runs. The user can either change the global seed and rerun the simulation, or can advance the substream state of the RNG, which is referred to as incrementing the run number. -A class :cpp:class:`ns3::SeedManager` provides an API to control the seeding and +A class :cpp:class:`ns3::RngSeedManager` provides an API to control the seeding and run number behavior. This seeding and substream state setting must be called before any random variables are created; e.g:: - SeedManager::SetSeed (3); // Changes seed from default of 1 to 3 - SeedManager::SetRun (7); // Changes run number from default of 1 to 7 + RngSeedManager::SetSeed (3); // Changes seed from default of 1 to 3 + RngSeedManager::SetRun (7); // Changes run number from default of 1 to 7 // Now, create random variables Ptr x = CreateObject (); Ptr y = CreateObject (); diff --git a/src/core/model/rng-seed-manager.h b/src/core/model/rng-seed-manager.h index 7be2a6aa4..4f84231f0 100644 --- a/src/core/model/rng-seed-manager.h +++ b/src/core/model/rng-seed-manager.h @@ -12,7 +12,7 @@ public: * \brief set the seed * it will duplicate the seed value 6 times * \code - * SeedManger::SetSeed(15); + * RngSeedManger::SetSeed(15); * UniformVariable x(2,3); //these will give the same output everytime * ExponentialVariable y(120); //as long as the seed stays the same * \endcode @@ -36,9 +36,9 @@ public: * \brief Set the run number of simulation * * \code - * SeedManager::SetSeed(12); + * RngSeedManager::SetSeed(12); * int N = atol(argv[1]); //read in run number from command line - * SeedManager::SetRun(N); + * RngSeedManager::SetRun(N); * UniformVariable x(0,10); * ExponentialVariable y(2902); * \endcode