diff -r 70f3967ca6eb -r 81563e019fa4 lemon/random.h --- a/lemon/random.h Thu Mar 20 12:12:24 2008 +0000 +++ b/lemon/random.h Thu Mar 20 17:15:35 2008 +0100 @@ -575,6 +575,26 @@ return *this; } + /// \brief Seeding random sequence + /// + /// Seeding the random sequence. The current number type will be + /// converted to the architecture word type. + template + void seed(Number seed) { + _random_bits::Initializer::init(core, seed); + } + + /// \brief Seeding random sequence + /// + /// Seeding the random sequence. The given range should contain + /// any number type and the numbers will be converted to the + /// architecture word type. + template + void seed(Iterator begin, Iterator end) { + typedef typename std::iterator_traits::value_type Number; + _random_bits::Initializer::init(core, begin, end); + } + /// \brief Returns a random real number from the range [0, 1) /// /// It returns a random real number from the range [0, 1). The