/* * RandomNumberEngine_Parameters.hpp * * Created on: Jan 6, 2011 * Author: heber */ #ifndef RANDOMNUMBERENGINE_PARAMETERS_HPP_ #define RANDOMNUMBERENGINE_PARAMETERS_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include class RandomNumberEngine; struct RandomNumberEngine_Parameters { /** Constructor of class RandomNumberEngine_Parameters. * * @note sets all values to noset_value. */ RandomNumberEngine_Parameters(); /** Copy constructor of class RandomNumberEngine_Parameters. * * * @param _ref reference to instance to copy */ RandomNumberEngine_Parameters(const RandomNumberEngine_Parameters &_ref); /** Destructor of class RandomNumberEngine_Parameters. * */ ~RandomNumberEngine_Parameters(); enum ParamList { param_seed, }; /** This value is chosen such that no parameter can have it as a sensible * value. */ static const double noset_value; /** Fills the structure from the parameters obtained from \a engine. * * @param _engine */ void getParameters(const RandomNumberEngine* const _engine); /** Merges this parameter set with another, where other has priority. * * @note we ignore entries in \a _params with noset_value. * * @param _params other parameter set to update with */ void update(const RandomNumberEngine_Parameters &_params); /** Checks whether all parameters are set to noset_value values. * * noset_value * * @return true - all are equal noset_value, * false - at least is not equal noset_value */ bool isDefault() const; int seed; //!< seed of random number engine typedef std::map< std::string, ParamList > ParamNames; static ParamNames params; }; std::ostream & operator << (std::ostream& ost, const RandomNumberEngine_Parameters ¶ms); std::istream & operator >> (std::istream& ist, RandomNumberEngine_Parameters ¶ms); #endif /* RANDOMNUMBERENGINE_PARAMETERS_HPP_ */