packages/Utils/rng/RNG_Control.cc
//---------------------------------------------------------------------------//
// CONSTRUCTOR
//---------------------------------------------------------------------------//
/*!
 * \brief RNG_Control class constructor.
 *
 * Constructor for the RNG_Control class only requires one argument with 3
 * additional options.
 *
 * \param seed seed value
 * \param number total number of independent streams; default = 1.0e9
 * \param stream stream index; default = 0
 * \param parameter SPRNG parameter that determines the size of the SPRNG
 *        state, see the SPRNG library documentation for details; default = 1
 */
CONSTRUCTOR
\brief RNG_Control class constructor.

Constructor for the RNG_Control class only requires one argument with 3
additional options.

\param seed seed value
\param number total number of independent streams; default = 1.0e9
\param stream stream index; default = 0
\param parameter SPRNG parameter that determines the size of the SPRNG
state, see the SPRNG library documentation for details; default = 1
CONSTRUCTOR \ brief RNG_Control class constructor . Constructor for the RNG_Control class only requires one argument with 3 additional options . \ param seed seed value \ param number total number of independent streams ; default = 1 . 0e9 \ param stream stream index ; default = 0 \ param parameter SPRNG parameter that determines the size of the SPRNG state see the SPRNG library documentation for details ; default = 1
RNG_Control::RNG_Control(int seed,
                         int number,
                         int stream,
                         int parameter)
    : d_seed(seed)
    , d_number(number)
    , d_stream(stream)
    , d_parameter(parameter)
{
    REQUIRE(d_stream <= d_number);
    RNG temp = make_random_number_generator();
    std::vector<char> pack = temp.pack();
    d_size                 = pack.size();
    CHECK(d_size >= 0);
}
RNG_Control :: RNG_Control ( int seed , int number , int stream , int parameter ) : d_seed ( seed ) , d_number ( number ) , d_stream ( stream ) , d_parameter ( parameter ) { REQUIRE ( d_stream <= d_number ) ; RNG temp = make_random_number_generator ( ) ; std :: vector < char > pack = temp . pack ( ) ; d_size = pack . size ( ) ; CHECK ( d_size >= 0 ) ; }
CONSTRUCTOR
 \brief RNG_Control class constructor.
CONSTRUCTOR \ brief RNG_Control class constructor .
// make a spring object and pack it to determine the size // pack it and set size