...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::unit_test::data::monomorphic::random_t — Generator for the random sequences.
// In header: <boost/test/data/monomorphic/generators/random.hpp> template<typename SampleType = double, typename DistributionType = typename ds_detail::default_distribution<SampleType>::type, typename EngineType = std::default_random_engine> class random_t { public: // types typedef SampleType sample; typedef DistributionType distr_type; typedef EngineType engine_type; // construct/copy/destruct random_t(); explicit random_t(distr_type &&); random_t(engine_type &&, distr_type &&); // public member functions data::size_t capacity() const; SampleType next(); void reset(); template<typename SeedType> void seed(SeedType &&); };
This class implements the generator concept (see boost::unit_test::data::monomorphic::generated_by) for implementing a random number generator.
random_t
public member functionsdata::size_t capacity() const;
SampleType next();
void reset();
template<typename SeedType> void seed(SeedType && seed);Sets the seed of the pseudo-random number engine.