| ... | ... |
@@ -540,6 +540,10 @@ |
| 540 | 540 |
/// |
| 541 | 541 |
/// @{
|
| 542 | 542 |
|
| 543 |
///\name Initialization |
|
| 544 |
/// |
|
| 545 |
/// @{
|
|
| 546 |
|
|
| 543 | 547 |
/// \brief Default constructor |
| 544 | 548 |
/// |
| 545 | 549 |
/// Constructor with constant seeding. |
| ... | ... |
@@ -611,7 +615,7 @@ |
| 611 | 615 |
/// \brief Seeding from file or from process id and time |
| 612 | 616 |
/// |
| 613 | 617 |
/// By default, this function calls the \c seedFromFile() member |
| 614 |
/// function with the <tt>/dev/urandom</tt> file. If it |
|
| 618 |
/// function with the <tt>/dev/urandom</tt> file. If it does not success, |
|
| 615 | 619 |
/// it uses the \c seedFromTime(). |
| 616 | 620 |
/// \return Currently always true. |
| 617 | 621 |
bool seed() {
|
| ... | ... |
@@ -634,7 +638,7 @@ |
| 634 | 638 |
/// entropy). |
| 635 | 639 |
/// \param file The source file |
| 636 | 640 |
/// \param offset The offset, from the file read. |
| 637 |
/// \return True when the seeding |
|
| 641 |
/// \return True when the seeding successes. |
|
| 638 | 642 |
#ifndef WIN32 |
| 639 | 643 |
bool seedFromFile(const std::string& file = "/dev/urandom", int offset = 0) |
| 640 | 644 |
#else |
| ... | ... |
@@ -704,6 +708,12 @@ |
| 704 | 708 |
return real<Number>() * (b - a) + a; |
| 705 | 709 |
} |
| 706 | 710 |
|
| 711 |
/// @} |
|
| 712 |
|
|
| 713 |
///\name Uniform distributions |
|
| 714 |
/// |
|
| 715 |
/// @{
|
|
| 716 |
|
|
| 707 | 717 |
/// \brief Returns a random real number from the range [0, 1) |
| 708 | 718 |
/// |
| 709 | 719 |
/// It returns a random double from the range [0, 1). |
| ... | ... |
@@ -761,6 +771,8 @@ |
| 761 | 771 |
return _random_bits::IntConversion<Number, Word>::convert(core); |
| 762 | 772 |
} |
| 763 | 773 |
|
| 774 |
/// @} |
|
| 775 |
|
|
| 764 | 776 |
unsigned int uinteger() {
|
| 765 | 777 |
return uinteger<unsigned int>(); |
| 766 | 778 |
} |
0 comments (0 inline)