packages/Utils/rng/RNG_Control.cc
//---------------------------------------------------------------------------//
/*!
 * \brief Create a SPRNG random number object at a given stream index.
 *
 * \param stream a user-requested random number index
 * \return SPRNG random number object
 *
 * This function is identical to rtt_rng::RNG_Control::rng() with the
 * exception: the user enters a stream index for the random number state.
 * Note that the entered stream index becomes the new RNG_Control stream
 * index from which future random numbers are created.  The entered stream
 * index is incremented by one after creating the random number.
 */
\brief Create a SPRNG random number object at a given stream index.
\param stream a user-requested random number index
\return SPRNG random number object


\ brief Create a SPRNG random number object at a given stream index . \ param stream a user - requested random number index \ return SPRNG random number object
RNG_Control::RNG_t RNG_Control::rng(int stream)
{
    REQUIRE(stream <= d_number);
    d_stream = stream;
    RNG random = make_random_number_generator();
    d_stream++;
    return random;
}
RNG_Control :: RNG_t RNG_Control :: rng ( int stream ) { REQUIRE ( stream <= d_number ) ; d_stream = stream ; RNG random = make_random_number_generator ( ) ; d_stream ++ ; return random ; }
\brief Create a SPRNG random number object at a given stream index.
\ brief Create a SPRNG random number object at a given stream index .
// reset streamnum // create a new Rnd object // advance the counter // return the object