[Lemon-commits] Alpar Juttner: Doc improvements in random.h
Lemon HG
hg at lemon.cs.elte.hu
Thu Jun 19 18:30:49 CEST 2008
details: http://lemon.cs.elte.hu/hg/lemon/rev/d2bac07f1742
changeset: 178:d2bac07f1742
user: Alpar Juttner <alpar [at] cs.elte.hu>
date: Tue Apr 15 14:12:10 2008 +0200
description:
Doc improvements in random.h
diffstat:
1 file changed, 14 insertions(+), 2 deletions(-)
lemon/random.h | 16 ++++++++++++++--
diffs (54 lines):
diff -r b685e12e08c0 -r d2bac07f1742 lemon/random.h
--- a/lemon/random.h Thu Jun 19 10:59:22 2008 +0200
+++ b/lemon/random.h Tue Apr 15 14:12:10 2008 +0200
@@ -540,6 +540,10 @@
///
/// @{
+ ///\name Initialization
+ ///
+ /// @{
+
/// \brief Default constructor
///
/// Constructor with constant seeding.
@@ -611,7 +615,7 @@
/// \brief Seeding from file or from process id and time
///
/// By default, this function calls the \c seedFromFile() member
- /// function with the <tt>/dev/urandom</tt> file. If it is not success,
+ /// function with the <tt>/dev/urandom</tt> file. If it does not success,
/// it uses the \c seedFromTime().
/// \return Currently always true.
bool seed() {
@@ -634,7 +638,7 @@
/// entropy).
/// \param file The source file
/// \param offset The offset, from the file read.
- /// \return True when the seeding is success.
+ /// \return True when the seeding successes.
#ifndef WIN32
bool seedFromFile(const std::string& file = "/dev/urandom", int offset = 0)
#else
@@ -704,6 +708,12 @@
return real<Number>() * (b - a) + a;
}
+ /// @}
+
+ ///\name Uniform distributions
+ ///
+ /// @{
+
/// \brief Returns a random real number from the range [0, 1)
///
/// It returns a random double from the range [0, 1).
@@ -760,6 +770,8 @@
Number uinteger() {
return _random_bits::IntConversion<Number, Word>::convert(core);
}
+
+ /// @}
unsigned int uinteger() {
return uinteger<unsigned int>();
More information about the Lemon-commits
mailing list