576 core.copyState(other.core); |
576 core.copyState(other.core); |
577 } |
577 } |
578 return *this; |
578 return *this; |
579 } |
579 } |
580 |
580 |
|
581 /// \brief Seeding random sequence |
|
582 /// |
|
583 /// Seeding the random sequence. The current number type will be |
|
584 /// converted to the architecture word type. |
|
585 template <typename Number> |
|
586 void seed(Number seed) { |
|
587 _random_bits::Initializer<Number, Word>::init(core, seed); |
|
588 } |
|
589 |
|
590 /// \brief Seeding random sequence |
|
591 /// |
|
592 /// Seeding the random sequence. The given range should contain |
|
593 /// any number type and the numbers will be converted to the |
|
594 /// architecture word type. |
|
595 template <typename Iterator> |
|
596 void seed(Iterator begin, Iterator end) { |
|
597 typedef typename std::iterator_traits<Iterator>::value_type Number; |
|
598 _random_bits::Initializer<Number, Word>::init(core, begin, end); |
|
599 } |
|
600 |
581 /// \brief Returns a random real number from the range [0, 1) |
601 /// \brief Returns a random real number from the range [0, 1) |
582 /// |
602 /// |
583 /// It returns a random real number from the range [0, 1). The |
603 /// It returns a random real number from the range [0, 1). The |
584 /// default Number type is double. |
604 /// default Number type is double. |
585 template <typename Number> |
605 template <typename Number> |