[boost-doc-zh] r418 committed - 翻译 random 库的 qbk 文件

Revision: 418
Author: alai04
Date: Sun Jun 27 21:20:29 2010
Log: 翻译 random 库的 qbk 文件
http://code.google.com/p/boost-doc-zh/source/detail?r=418

Modified:
 /trunk/libs/random/doc/concepts.qbk
 /trunk/libs/random/doc/distribution_performance_linux.qbk
 /trunk/libs/random/doc/distribution_performance_windows.qbk
 /trunk/libs/random/doc/distributions.qbk
 /trunk/libs/random/doc/generator_performance_linux.qbk
 /trunk/libs/random/doc/generator_performance_windows.qbk
 /trunk/libs/random/doc/generators.qbk
 /trunk/libs/random/doc/performance.qbk
 /trunk/libs/random/doc/random.qbk
 /trunk/libs/random/doc/random_number_generator.qbk
 /trunk/libs/random/doc/tutorial.qbk

=======================================
--- /trunk/libs/random/doc/concepts.qbk Mon May 31 00:54:22 2010
+++ /trunk/libs/random/doc/concepts.qbk Sun Jun 27 21:20:29 2010
@@ -6,133 +6,176 @@
  / http://www.boost.org/LICENSE_1_0.txt)
 ]

-[section Introduction]
-
-Random numbers are required in a number of different problem domains, such as
-
-* numerics (simulation, Monte-Carlo integration)
-* games (non-deterministic enemy behavior)
-* security (key generation)
-* testing (random coverage in white-box tests)
+[section:introduction Introduction 简介]
+
+Random numbers are required in a number of different problem domains, such as\n
+许多应用领域都需要用到随机数,例如:
+
+* numerics (simulation, Monte-Carlo integration) \n
+  数字控制 (模拟, Monte-Carlo 算法)
+* games (non-deterministic enemy behavior) \n
+  游戏 (敌人的行为应该是不确定的)
+* security (key generation) \n
+  安全 (密钥生成)
+* testing (random coverage in white-box tests) \n
+  测试 (白盒测试中的随机覆盖)

 The Boost Random Number Generator Library provides a framework for random
number generators with well-defined properties so that the generators can be
 used in the demanding numerics and security domains. For a general
-introduction to random numbers in numerics, see
+introduction to random numbers in numerics, see \n
+Boost 随机数生成库框架中的随机数生成器具有良好的性质,因此它们可以用于数字 控制和安全领域。关于数字控制中随机数应用的介绍,参看:

[:"Numerical Recipes in C: The art of scientific computing", William H. Press,
 Saul A. Teukolsky, William A. Vetterling, Brian P. Flannery, 2nd ed., 1992,
 pp. 274-328]

Depending on the requirements of the problem domain, different variations of
-random number generators are appropriate:
-
-* non-deterministic random number generator
-* pseudo-random number generator
-* quasi-random number generator
+random number generators are appropriate: \n
+以下几种随机数生成器对应于不同的应用领域:
+
+* non-deterministic random number generator \n
+  不确定随机数生成器
+* pseudo-random number generator \n
+  伪随机数生成器
+* quasi-random number generator \n
+  拟随机数生成器

 All variations have some properties in common, these concepts (in the STL
sense) are called __NumberGenerator and __UniformRandomNumberGenerator. Each
-concept will be defined in a subsequent section.
-
-The goals for this library are the following:
-
-* allow easy integration of third-party random-number generators
-* define a validation interface for the generators
-* provide easy-to-use front-end classes which model popular distributions
-* provide maximum efficiency
-* allow control on quantization effects in front-end processing (not yet done)
+concept will be defined in a subsequent section. \n
+所有的变体都具有一些共同的性质,这些 (STL) 概念叫做 __NumberGenerator 和 __UniformRandomNumberGenerator。
+每一种概念都将在相应节中予以定义。
+
+The goals for this library are the following:\n
+本库的目标是:
+
+* allow easy integration of third-party random-number generators \n
+  简化第三方随机数生成器的集成
+* define a validation interface for the generators \n
+  定义生成器的检验接口
+* provide easy-to-use front-end classes which model popular distributions \n
+  为常见分布提供易用的前端类
+* provide maximum efficiency \n
+  提供尽可能高的效率
+* allow control on quantization effects in front-end processing (not yet done) \n
+  控制前端处理中的量子化 (quantization) 问题 (未完成)

 [endsect]

-[section Number Generator]
+[section:number_generator Number Generator 数字生成器]

A number generator is a /function object/ (std:20.3 [lib.function.objects]) that
 takes zero arguments. Each call to `operator()` returns a number. In the
following table, X denotes a number generator class returning objects of type
-T, and u is a value of X.
-
-[table NumberGenerator requirements
-  [[expression] [return type] [pre/post-condition]]
+T, and u is a value of X.\n
+数字生成器是带 0 个参数的 /函数对象/ (std:20.3 [lib.function.objects])。每 次调用 `operator()` 都返回一个数字。
+下表中,X 是返回类型 T 的数字生成器类,u 是 X 的实例。
+
+[table NumberGenerator requirements 要求
+ [[expression 表达式] [return type 返回类型] [pre/post-condition 先验/后验 条件]]
   [[`X::result_type`] [`T`] [`std::numeric_limits<T>::is_specialized` is
                              `true`, `T` is __LessThanComparable]]
   [[`u.operator()()`] [`T`] [-]]
 ]

[note The NumberGenerator requirements do not impose any restrictions on the
-characteristics of the returned numbers.]
+characteristics of the returned numbers.\n
+NumberGenerator 要求中并未对返回值的性质作任何限定。]

 [endsect]

-[section Uniform Random Number Generator]
+[section:uniform_random_number_generator Uniform Random Number Generator 均 匀随机数生成器]

 A uniform random number generator is a __NumberGenerator that provides a
 sequence of random numbers uniformly distributed on a given range. The
range can be compile-time fixed or available (only) after run-time construction
-of the object.
+of the object.\n
+一个均匀随机数生成器是一个 __NumberGenerator,它能提供在给定值域内均匀分布 的随机数序列。 +这一值域可以是编译时就确定的;也可以是 (仅) 在运行时生成器构建之后才可知 的。

The /tight lower bound/ of some (finite) set S is the (unique) member l in S, so that for all v in S, l <= v holds. Likewise, the /tight upper bound/ of some (finite) set S is the (unique) member u in S, so that for all v in S, v <= u
-holds.
+holds.\n
+(有限)集合 S 的 /紧下界/ 是 S 中的(唯一)元素 l,满足:对 S 中的任意元素 v,l <= v 成立。 +类似地,(有限)集合 S 的 /紧上界/ 是 S 中的(唯一)元素 u,满足:对 S 中的任意 元 v,v <= u 成立。

In the following table, X denotes a number generator class returning objects
-of type T, and v is a const value of X.
-
-[table UniformRandomNumberGenerator requirements
-  [[expression] [return type] [pre/post-condition]]
+of type T, and v is a const value of X.\n
+下表中,X 是返回类型 T 的均匀随机数生成器类,v 是 X 的 const 实例。
+
+[table UniformRandomNumberGenerator requirements 要求
+ [[expression 表达式] [return type 返回类型] [pre/post-condition 先验/后验 条件]] [[`X::has_fixed_range`] [`bool`] [compile-time constant; if `true`, the range on which the random numbers are uniformly distributed is known at compile-time and members `min_value` and `max_value` exist. Note: This flag may also be `false` due to
-                                    compiler limitations]]
+                                    compiler limitations\n
+ 编译时常量;若为 `true`,随机数均匀分布 的值域在编译时是可知的,成员 `min_value` 和 `max_value` 存在。 + 注意:由于编译器的限制,这一标志可能为 `false`。]] [[`X::min_value`] [`T`] [compile-time constant; `min_value` is only defined if `has_fixed_range` is `true`. If it exists, it is
-                           equal to `v.min()`.]]
+                           equal to `v.min()`.\n
+ 编译时常量;`min_value` 仅当 `has_fixed_range` 为 `true` 时有定义。若存在则等于 `v.min()`]] [[`X::max_value`] [`T`] [compile-time constant; `max_value` is only defined if `has_fixed_range` is `true`. If it exists, it is
-                           equal to `v.max()`]]
+                           equal to `v.max()`\n
+ 编译时常量;`max_value` 仅当 `has_fixed_range` 为 `true` 时有定义。若存在则等于 `v.max()`]] [[`v.min()`] [`T`] [tight lower bound on the set of all values returned by `operator()`. The return value of this function shall not
-                      change during the lifetime of the object.]]
+                      change during the lifetime of the object.\n
+ `operator()` 可能返回的值的紧下界。此函数的返回值在 v 的生存期内不会改变。]]
   [[`v.max()`] [`T`] [if `std::numeric_limits<T>::is_integer`, tight upper
bound on the set of all values returned by `operator()`, otherwise, the smallest representable number larger than the tight upper bound on the set of all values returned by `operator()`. In any case, the return value of this
                       function shall not change during the lifetime of the
-                      object.]]
+                      object.\n
+ 若 `std::numeric_limits<T>::is_integer` 为真,则为 `operator()` 可能返回的值的紧上界; + 否则为大于该紧上界的最小可表示数字。此函数的返回值在 v 的生存期内不会改变。]]
 ]

 The member functions `min`, `max`, and `operator()` shall have amortized
-constant time complexity.
+constant time complexity.\n
+成员函数 `min`, `max`, 和 `operator()` 的均摊时间复杂度应当是常数。

 [note For integer generators (i.e. integer `T`), the generated values `x`
 fulfill `min() <= x <= max()`, for non-integer generators (i.e. non-integer
-`T`), the generated values `x` fulfill `min() <= x < max()`.
+`T`), the generated values `x` fulfill `min() <= x < max()`.\n
+对于整数生成器 (即 `T` 为整数类型),生成的值 `x` 满足 `min() <= x <= max()`; +对非整数生成器 (即 `T` 为非整数类型),生成的值 `x` 满足 `min() <= x < max()`。

Rationale: The range description with min and max serves two purposes. First,
 it allows scaling of the values to some canonical range, such as [0..1).
 Second, it describes the significant bits of the values, which may be
-relevant for further processing.
+relevant for further processing.\n
+原理:min 和 max 所描述的值域有两个用途。首先,借助它可以把生成的值缩放到某 个“正规”的值域内,如 [0..1)。
+其次,它描述了生成值的有效位数,后者在进一步处理过程中可能会有用。

The range is a closed interval \[min,max\] for integers, because the underlying type may not be able to represent the half-open interval \[min,max+1). It is a half-open interval \[min, max) for non-integers, because this is much more
-practical for borderline cases of continuous distributions.]
+practical for borderline cases of continuous distributions.\n
+对于整数,值域是闭区间 \[min,max\],因为现有的整数类型可能无法表示半开区间 \[min,max+1)。 +对于非整数,值域是半开区间 \[min, max),因为作此规定在处理连续分布的边界情 况时更为方便。]

 [note The __UniformRandomNumberGenerator concept does not require
 `operator()(long)` and thus it does not fulfill the `RandomNumberGenerator`
 (std:25.2.11 \[lib.alg.random.shuffle\]) requirements. Use the
-__random_number_generator adapter for that.
+__random_number_generator adapter for that.\n
+__UniformRandomNumberGenerator 概念并不需要 `operator()(long)` 因此不满足 `RandomNumberGenerator` +(std:25.2.11 \[lib.alg.random.shuffle\]) 需求。如果需要,应该使用 __random_number_generator。

Rationale: `operator()(long)` is not provided, because mapping the output of -some generator with integer range to a different integer range is not trivial.] +some generator with integer range to a different integer range is not trivial.\n +原理:没有提供 `operator()(long)`,因为把某些生成器产生的结果从一个整数值域 映射到另一个整数值域会带来开销。]

 [endsect]

-[section Non-deterministic Uniform Random Number Generator]
+[section:non_deterministic_uniform_random_number_generator Non-deterministic Uniform Random Number Generator 不确定均匀随机数生成器]

 A non-deterministic uniform random number generator is a
 __UniformRandomNumberGenerator that is based on some stochastic process.
@@ -140,21 +183,27 @@
 processes are nuclear decay, noise of a Zehner diode, tunneling of quantum
particles, rolling a die, drawing from an urn, and tossing a coin. Depending on the environment, inter-arrival times of network packets or keyboard events
-may be close approximations of stochastic processes.
+may be close approximations of stochastic processes.\n
+一个不确定均匀随机数生成器是一个 __UniformRandomNumberGenerator,它基于某种 随机过程,因此能提供“真正随机的”的随机数序列。 +随机过程包括原子核衰变、Zehner 二极管的噪音、量子隧道效应、投掷骰子、罐中取 物、投掷硬币等等。
+网络数据包到达的间隔、键盘事件有时也可以被看作随机过程。

 The class __random_device is a model for a non-deterministic random number
-generator.
+generator.\n
+__random_device 类是不确定随机数生成器的一个模型。

 [note This type of random-number generator is useful for security
 applications, where it is important to prevent an outside attacker from
guessing the numbers and thus obtaining your encryption or authentication key. Thus, models of this concept should be cautious not to leak any information, to the extent possible by the environment. For example, it might be advisable -to explicitly clear any temporary storage as soon as it is no longer needed.] +to explicitly clear any temporary storage as soon as it is no longer needed.\n +这种随机数生成器可以用于安全应用,从而避免入侵者“猜出”程序所生成的随机 数,从而窃取密码或者认证密钥。 +因此,这一概念的模型必须小心设计,不能泄露与环境有关的任何信息。例如,及时 清除临时数据可能是很恰当的。]

 [endsect]

-[section Pseudo-Random Number Generator]
+[section:pseudo_random_number_generator Pseudo-Random Number Generator 伪随 机数生成器]

 A pseudo-random number generator is a __UniformRandomNumberGenerator which
 provides a deterministic sequence of pseudo-random numbers, based on some
@@ -164,51 +213,67 @@
 number generators]. Often, these generators are very sensitive to their
 parameters. In order to prevent wrong implementations from being used, an
external testsuite should check that the generated sequence and the validation
-value provided do indeed match.
+value provided do indeed match.\n
+一个伪随机数生成器是一个 __UniformRandomNumberGenerator,它根据某一算法和内 部状态提供确定的伪随机数序列。 +[classref boost::random::linear_congruential 线性同余] 和 [classref boost::random::inversive_congruential 反向同余] 生成器属于此类生成器。 +此类生成器的行为往往在很大程度上取决于其参数。为检查出错误的实现,应该提供 一个外部测试套件来检查所产生的序列和验证值相符。

Donald E. Knuth gives an extensive overview on pseudo-random number generation
 in his book "The Art of Computer Programming, Vol. 2, 3rd edition,
 Addison-Wesley, 1997". The descriptions for the specific generators contain
-additional references.
+additional references.\n
+Donald E. Knuth 在其著作 "The Art of Computer Programming, Vol. 2, 3rd edition, Addison-Wesley, 1997" 中给出了伪随机数生成的综述。
+对各个生成器的描述将分别指出其参考资料。

 [note Because the state of a pseudo-random number generator is necessarily
 finite, the sequence of numbers returned by the generator will loop
-eventually.]
+eventually.\n
+因为伪随机数生成器的状态是有穷的,生成器返回的数字序列最终总会陷入循环。]

 In addition to the __UniformRandomNumberGenerator requirements,
 a pseudo-random number generator has some additional requirements. In the
following table, `X` denotes a pseudo-random number generator class returning objects of type `T`, `x` is a value of `T`, `u` is a value of `X`, and `v` is
-a const value of `X`.
-
-[table PseudoRandomNumberGenerator requirements
-  [[expression] [return type] [pre/post-condition]]
+a const value of `X`.\n
+伪随机数生成器的需求是 __UniformRandomNumberGenerator 需求的超集。
+下表中,`X` 是返回类型 `T` 的伪随机数生成器类,`x` 是 `T` 的实例,`u` 是 `X` 的实例,`v` 是 `X` 的 const 实例。
+
+[table PseudoRandomNumberGenerator requirements 要求
+ [[expression 表达式] [return type 返回类型] [pre/post-condition 先验/后验 条件]]
   [[`X()`] [-] [creates a generator in some implementation-defined state.
Note: Several generators thusly created may possibly produce
-                dependent or identical sequences of random numbers.]]
+                dependent or identical sequences of random numbers.\n
+ 创建一个生成器,其初始状态取决于实现。 注意:用这种方法创建 的多个生成器实例可能产生有关或者相同的随机数序列。]] [[`explicit X(...)`] [-] [creates a generator with user-provided state; the
                             implementation shall specify the constructor
-                            argument(s)]]
+                            argument(s)\n
+ 创建一个生成器,其初始状态由用户提供;构造函数 的参数由实现确定。]]
   [[`u.seed(...)`] [`void`] [sets the current state according to the
                              argument(s); at least functions with the same
                              signature as the non-default constructor(s)
-                             shall be provided.]]
+                             shall be provided.\n
+ 根据参数设置当前状态;至少要提供一个与非默认构 造函数签名式相同的 seed 函数。]]
   [[`X::validation(x)`] [`bool`] [compares the pre-computed and hardcoded
                                   10001th element in the generator's random
number sequence with x. The generator must
                                   have been constructed by its default
                                   constructor and seed must not have been
                                   called for the validation to be
-                                  meaningful.]]
+                                  meaningful.\n
+ 把 x 和随机数序列的第 10001 个元素相 比,后者是预先计算出来并硬编码的。 + 生成器必须使用默认构造函数构建,并且没有 调用 seed,以确保验证是有意义的。]]
 ]

 [note The seed member function is similar to the assign member function in
-STL containers. However, the naming did not seem appropriate.]
+STL containers. However, the naming did not seem appropriate.\n
+seed 成员函数与 STL 容器的 assign 成员函数类似,尽管后者的命名不太恰当。]

 Classes which model a pseudo-random number generator shall also model
 __EqualityComparable, i.e. implement `operator==`. Two pseudo-random number
 generators are defined to be /equivalent/ if they both return an identical
-sequence of numbers starting from a given state.
+sequence of numbers starting from a given state.\n
+伪随机数生成器的模型类也必须是 __EqualityComparable 的模型,即实现 `operator==`。
+若从给定状态出发,两伪随机数生成器返回相同的数字序列,则称它们 /等价/。

 Classes which model a pseudo-random number generator should also model the
 __Streamable concept, i.e. implement `operator<<` and `operator>>`. If so,
@@ -217,57 +282,77 @@
time. The state shall be written in a platform-independent manner, but it is
 assumed that the `locales` used for writing and reading be the same. The
 pseudo-random number generator with the restored state and the original at
-the just-written state shall be equivalent.
+the just-written state shall be equivalent.\n
+伪随机数生成器的模型类也应当是 __Streamable 概念的模型,即实现 `operator<<` 和 `operator>>`。 +若实现,`operator<<` 把伪随机数生成器的当前全部状态写入给定的 `ostream` 中;`operator>>` 用于其后恢复状态。 +状态应该以平台无关的方式写入;但可以假设读写时 locales 是相同的。恢复后的伪 随机数生成器和原生成器应等价。

 Classes which model a pseudo-random number generator may also model the
 __CopyConstructible and __Assignable concepts. However, note that the
 sequences of the original and the copy are strongly correlated (in fact,
they are identical), which may make them unsuitable for some problem domains.
 Thus, copying pseudo-random number generators is discouraged; they should
-always be passed by (non-const) reference.
+always be passed by (non-const) reference.\n
+伪随机数生成器的模型类也可以是 __CopyConstructible 和 __Assignable 概念的模 型。
+但请注意,原生成器和其副本是完全相同的,因此对于有些应用领域可能会不恰当。
+因此,不鼓励复制伪随机数生成器;它们总应以 (非 const) 引用传递。

 The classes __rand48, __minstd_rand, and __mt19937 are models for a
-pseudo-random number generator.
+pseudo-random number generator.\n
+__rand48, __minstd_rand, 和 __mt19937 类是伪随机数生成器的模型。

[note This type of random-number generator is useful for numerics, games and
 testing. The non-zero arguments constructor(s) and the `seed()` member
function(s) allow for a user-provided state to be installed in the generator. This is useful for debugging Monte-Carlo algorithms and analyzing particular test scenarios. The __Streamable concept allows to save/restore the state of
-the generator, for example to re-run a test suite at a later time.]
+the generator, for example to re-run a test suite at a later time.\n
+此类伪随机数生成器可用于数字控制、游戏和测试。取不少于一个参数的构造函数和 `seed()` 成员函数可以让用户设定状态; +在调试 Monte-Carlo 算法、分析特定的测试场景 (test scenario) 时这是很有用 的。 +__Streamable 概念允许保存和恢复生成器的状态,例如隔一段时间后重新运行某一测 试套件。]

 [endsect]

-[section Random Distribution]
+[section:random_distribution Random Distribution 随机分布]

 A random distribution produces random numbers distributed according to some
 distribution, given uniformly distributed random values as input. In the
following table, `X` denotes a random distribution class returning objects of type `T`, `u` is a value of `X`, `x` is a (possibly const) value of `X`, and
 `e` is an lvalue of an arbitrary type that meets the requirements of a
-__UniformRandomNumberGenerator, returning values of type `U`.
+__UniformRandomNumberGenerator, returning values of type `U`.\n
+随机分布取均匀分布的随机值作为输入,输出符合某一分布的随机数。
+下表中,`X` 是返回 T 类型的随机分布类,`u` 是 `X` 的实例,`x` 是 `X` 的实 例 (可为 const),`e` 是任一
+__UniformRandomNumberGenerator 类型的左值,返回类型是 `U`。

[table Random distribution requirements (in addition to NumberGenerator, CopyConstructible, and Assignable)
-  [[expression] [return type] [pre/post-condition] [complexity]]
-  [[`X::input_type`] [`U`] [-] [compile-time]]
+ [[expression 表达式] [return type 返回类型] [pre/post-condition 先验/后验 条件] [complexity 复杂度]]
+  [[`X::input_type`] [`U`] [-] [compile-time\n
+  编译期]]
   [[`u.reset()`] [`void`] [subsequent uses of `u` do not depend on values
-                           produced by `e` prior to invoking `reset`.]
-                         [constant]]
+                           produced by `e` prior to invoking `reset`.\n
+ 此后对 `u` 的使用将不受调用 `reset` 前 `e` 产生 的数字序列的影响。]
+                         [constant\n常数]]
[[`u(e)`] [`T`] [the sequence of numbers returned by successive invocations with the same object `e` is randomly distributed with some
-                   probability density function `p(x)`]
-                  [amortized constant  number of invocations of `e`]]
+                   probability density function `p(x)`\n
+ 使用同一对象 `e` 反复调用产生的随机数序列将按某一概率密 度函数 `p(x)` 随机分布。]
+                  [amortized constant  number of invocations of `e`\n
+                  (均摊) 对 `e` 的调用的复杂度的常数倍]]
   [[`os << x`] [`std::ostream&`] [writes a textual representation for the
parameters and additional internal data of
                                   the distribution `x` to `os`.
post: The `os.fmtflags` and fill character
-                                  are unchanged.]
+                                  are unchanged.\n
+ 把分布 `x` 的参数内部状态的文本表示写入 到 `os` 中。之后:`os.fmtflags` 和填充字符不变。]
                                  [O(size of state)]]
   [[`is >> u`] [`std::istream&`] [restores the parameters and additional
                                   internal data of the distribution `u`.
pre: `is` provides a textual representation that was previously written by `operator<<`
-                                  post: The `is.fmtflags` are unchanged.]
+                                  post: The `is.fmtflags` are unchanged.\n
+ 恢复分布 `u` 的参数和内部状态。之 前:`is` 提供之前由 `operator<<` 写入的文本表示。
+                                  之后:`is.fmtflags` 不变。]
                                  [O(size of state)]]
 ]

@@ -277,6 +362,8 @@
 using `os << x` and that representation is restored into the same or a
 different object `y` of the same type using `is >> y`, repeated invocations
 of `y(e)` produce the same sequence of random numbers as would repeated
-invocations of `x(e)`.
+invocations of `x(e)`.\n
+附加需求:反复调用 `x(e)` 产生的序列不应因调用 `os << x` 而改变;用 `os << x` 保存,并用 `is >> y` 恢复到同一或另一对象 `y`
+后,反复调用 `y(e)` 产生的序列应该和原序列相同。

 [endsect]
=======================================
--- /trunk/libs/random/doc/distribution_performance_linux.qbk Mon May 31 00:54:22 2010 +++ /trunk/libs/random/doc/distribution_performance_linux.qbk Sun Jun 27 21:20:29 2010
@@ -6,7 +6,7 @@
  / http://www.boost.org/LICENSE_1_0.txt)
 ]

-[table Distributions (Linux)
+[table Distributions 分布 (Linux)
   [[\[M rn/sec\]][minstd_rand][kreutzer1986][mt19937][lagged_fibonacci607]]
   [[uniform_int][31.25][30.581][11.5607][16.0514]]
   [[geometric][5.20833][6.66223][6.68449][6.73854]]
=======================================
--- /trunk/libs/random/doc/distribution_performance_windows.qbk Mon May 31 00:54:22 2010 +++ /trunk/libs/random/doc/distribution_performance_windows.qbk Sun Jun 27 21:20:29 2010
@@ -6,7 +6,7 @@
  / http://www.boost.org/LICENSE_1_0.txt)
 ]

-[table Distributions (Windows)
+[table Distributions 分布 (Windows)
   [[\[M rn/sec\]][minstd_rand][kreutzer1986][mt19937][lagged_fibonacci607]]
   [[uniform_int][14.7449][27.465][6.65292][28.5714]]
   [[geometric][7.10328][5.53649][3.73622][9.38438]]
=======================================
--- /trunk/libs/random/doc/distributions.qbk    Mon May 31 00:54:22 2010
+++ /trunk/libs/random/doc/distributions.qbk    Sun Jun 27 21:20:29 2010
@@ -8,7 +8,10 @@

In addition to the [link boost_random.reference.generators random number generators],
 this library provides distribution functions which map one distribution
-(often a uniform distribution provided by some generator) to another.
+(often a uniform distribution provided by some generator) to another.\n
+除了 [link boost_random.reference.generators 随机数生成器] 之外,
+本库还提供了把一种分布(通常是生成器产生的均匀分布)映射到另一种分布的分布函 数。 +(译注:在本节中,“分布”指统计学意义上的分布,而“分布函数”指的是类模板。内部 的随机数生成器有时会更一般地被称为“随机数源”。)

 Usually, there are several possible implementations of any given mapping.
 Often, there is a choice between using more space, more invocations of the
@@ -16,57 +19,85 @@
 as trigonometric functions. This interface description does not mandate any
specific implementation. However, implementations which cannot reach certain
 values of the specified distribution or otherwise do not converge
-statistically to it are not acceptable.
-
-[table distributions
-  [[distribution] [explanation] [example]]
+statistically to it are not acceptable.\n
+对于某一映射通常会有多种实现方案:有的需要较多的空间和对内部随机数源的调 用,而有的需要进行较多的费时的运算,如三角函数。 +以下给出的对接口的描述是与具体实现无关的;然而,如果某一实现不能覆盖特定分 布的全部值域,或者不符合该分布的统计学性质,该实现是无效的。
+
+[table distributions 分布
+  [[distribution 分布] [explanation 描述] [example 示例]]
[[__uniform_smallint] [discrete uniform distribution on a small set of integers
                          (much smaller than the range of the underlying
-                         generator)]
-                        [drawing from an urn]]
+                         generator)\n
+ 在小整数集 (远小于内部生成器的值域) 上的离散均匀分 布]
+                        [drawing from an urn\n
+                        罐中取物]]
   [[__uniform_int] [discrete uniform distribution on a set of integers; the
underlying generator may be called several times to gather
-                    enough randomness for the output]
-                   [drawing from an urn]]
+                    enough randomness for the output\n
+ 在整数集上的离散均匀分布;可能会多次调用内部生成器以获 得足够多的“随机性”]
+                   [drawing from an urn\n
+                   罐中取物]]
   [[__uniform_01] [continuous uniform distribution on the range [0,1);
-                   important basis for other distributions]
+                   important basis for other distributions\n
+                   区间 [0,1) 上的连续均匀分布;此分布是其它分布的重要基础]
                   [-]]
[[__uniform_real] [continuous uniform distribution on some range [min, max) of
-                     real numbers]
+                     real numbers\n
+                     实数区间 [min, max) 上的连续均匀分布]
                     [for the range [0, 2pi): randomly dropping a stick and
                      measuring its angle in radians (assuming the angle is
-                     uniformly distributed)]]
+                     uniformly distributed)\n
+ 随机投下一木棍,其偏转角的弧度数是 [0, 2pi) 上的这种分 布 (假设偏转角的分布是均匀的)]] [[__bernoulli_distribution] [Bernoulli experiment: discrete boolean valued
-                               distribution with configurable probability]
-                              [tossing a coin (p=0.5)]]
+                               distribution with configurable probability\n
+ 伯努利试验 (Bernoulli experiment):布尔离散 分布,概率可配置]
+                              [tossing a coin (p=0.5)\n
+                              投掷硬币 (p=0.5)]]
   [[__binomial_distribution] [counts outcomes of repeated Bernoulli
-                              experiments]
+                              experiments\n
+                              计算重复伯努利试验的出现次数]
                              [tossing a coin 20 times and counting how many
-                                front sides are shown]]
-  [[__cauchy_distribution][cauchy distribution][-]]
-  [[__gamma_distribution][gamma distribution][-]]
-  [[__poisson_distribution][poisson distribution]
+                                front sides are shown\n
+                                抛掷硬币20次,计算正面出现的次数]]
+  [[__cauchy_distribution][cauchy distribution\n
+  柯西分布][-]]
+  [[__gamma_distribution][gamma distribution\n
+  伽玛分布][-]]
+  [[__poisson_distribution][poisson distribution\n
+  泊松分布]
                            [counting the number of alpha particles emitted
- by radioactive matter in a fixed period of time]] + by radioactive matter in a fixed period of time\n
+                            计算放射性物质在固定时间内发射的α粒子数量]]
[[__geometric_distribution] [measures distance between outcomes of repeated
-                             Bernoulli experiments]
+                             Bernoulli experiments\n
+ 几何分布:重复伯努利试验,两次指定结果间的验次 数]
                             [throwing a die several times and counting the
                              number of tries until a "6" appears for the
-                             first time]]
-  [[__triangle_distribution] [triangle distribution] [-]]
-  [[__exponential_distribution] [exponential distribution]
+                             first time\n
+                             抛掷骰子,记录"6"首次出现时的试验次数]]
+  [[__triangle_distribution] [triangle distribution\n
+  三角形分布] [-]]
+  [[__exponential_distribution] [exponential distribution\n
+  指数分布]
                                 [measuring the inter-arrival time of alpha
-                                 particles emitted by radioactive matter]]
+                                 particles emitted by radioactive matter\n
+                                 放射性物质发射 alpha 粒子的间隔时间]]
[[__normal_distribution] [counts outcomes of (infinitely) repeated Bernoulli
-                            experiments]
+                            experiments\n
+                            (无穷次)重复伯努利试验的结果计数]
[tossing a coin 10000 times and counting how many
-                            front sides are shown]]
+                            front sides are shown\n
+                            投掷硬币 10000 次,记录正面出现的次数]]
   [[__lognormal_distribution] [lognormal distribution (sometimes used in
-                               simulations)]
+                               simulations)\n
+                               对数正态分布(有时用于模拟)]
[measuring the job completion time of an assembly
-                               line worker]]
+                               line worker\n
+                               流水线工人的工作完成时间]]
[[__uniform_on_sphere] [uniform distribution on a unit sphere of arbitrary
-                          dimension]
+                          dimension\n
+                          任意给定维数空间的单位球面上的均匀分布]
                          [choosing a random point on Earth (assumed to be a
-                          sphere) where to spend the next vacations]]
+                          sphere) where to spend the next vacations\n
+                          在地球 (近似看作是球体) 表面任选一点去旅游]]
 ]
=======================================
--- /trunk/libs/random/doc/generator_performance_linux.qbk Mon May 31 00:54:22 2010 +++ /trunk/libs/random/doc/generator_performance_linux.qbk Sun Jun 27 21:20:29 2010
@@ -6,8 +6,8 @@
  / http://www.boost.org/LICENSE_1_0.txt)
 ]

-[table Basic Generators (Linux)
- [[generator] [M rn/sec] [time per random number \[nsec\]] [relative speed compared to fastest \[percent\]]]
+[table Basic Generators 基本生成器 (Linux)
+ [[generator 生成器] [M rn/sec] [time per random number 每个随机数所需时间 \[nsec\]] [relative speed compared to fastest 相对于最快生成器的速度 \[percent\]]]
   [[rand48][312.5][3.2][100%]]
   [[lrand48 run-time][303.03][3.3][96%]]
   [[lrand48 (C library)][67.5676][14.8][21%]]
=======================================
--- /trunk/libs/random/doc/generator_performance_windows.qbk Mon May 31 00:54:22 2010 +++ /trunk/libs/random/doc/generator_performance_windows.qbk Sun Jun 27 21:20:29 2010
@@ -6,8 +6,8 @@
  / http://www.boost.org/LICENSE_1_0.txt)
 ]

-[table Basic Generators (Windows)
- [[generator] [M rn/sec] [time per random number \[nsec\]] [relative speed compared to fastest \[percent\]]]
+[table Basic Generators 基本生成器 (Windows)
+ [[generator 生成器] [M rn/sec] [time per random number 每个随机数所需时 间 \[nsec\]] [relative speed compared to fastest 相对于最快生成器的速度 \[percent\]]]
   [[rand48][98.5222][10.15][67%]]
   [[lrand48 run-time][17.343][57.66][11%]]
   [[minstd_rand0][46.3822][21.56][31%]]
=======================================
--- /trunk/libs/random/doc/generators.qbk       Mon May 31 00:54:22 2010
+++ /trunk/libs/random/doc/generators.qbk       Sun Jun 27 21:20:29 2010
@@ -11,7 +11,10 @@
 the algorithm and its parameters. This library implements the algorithms as
 class templates with template value parameters, hidden in
`namespace boost::random`. Any particular choice of parameters is represented
-as the appropriately specializing `typedef` in `namespace boost`.
+as the appropriately specializing `typedef` in `namespace boost`.\n
+本库提供了数个 [prng 伪随机数生成器]。[prng 伪随机数生成器] 的性质与其算法 和参数都有密切的关系。
+生成算法用取数值参数的类模板实现,封装在 `namespace boost::random` 中。
+预先选择好的一组参数通过用 `typedef` 进行专门化来给出,置于`namespace boost` 中。

[prng Pseudo-random number generators] should not be constructed (initialized)
 frequently during program execution, for two reasons. First, initialization
@@ -26,7 +29,13 @@
 (non-random) distance from the time given as the seed for first
 initialization. The distance could even be zero if the resolution of the
 clock is low, thus the generator re-iterates the same sequence of random
-numbers. For some applications, this is inappropriate.
+numbers. For some applications, this is inappropriate.\n
+程序执行过程中不应当频繁构造(初始化) [prng 伪随机数生成器]。原因有二:
+其一,生成器的构造要求对其内部状态进行完全的初始化;因此包含大量内部状态的 生成器 (详下) 的构造往往是昂贵的。 +其二,生成器的构造需要提供序列的“种子”。取得多个良好的“种子”值往往是困难 的。
+取得种子的方法之一是使用精确度尽可能高 (毫秒甚至纳秒) 的系统时间。
+如果再构建一个 [prng 伪随机数生成器] 之后再构建另一个,那么它们所使用的种子 值之差会很接近一个常数。 +若系统时间的精确度不够高,这个差值甚至为零,从而得到两个行为相同的生成器。 对于很多应用,这样的行为都是不合适的。

 Note that all [prng pseudo-random number generators] described below are
 __CopyConstructible and __Assignable. Copying or assigning a generator will
@@ -34,24 +43,31 @@
identical sequence of random numbers. Often, such behavior is not wanted. In
 particular, beware of the algorithms from the standard library such as
`std::generate`. They take a functor argument by value, thereby invoking the
-copy constructor when called.
+copy constructor when called.\n
+注意以下描述的所有 [prng 伪随机数生成器] 都是 __CopyConstructible 和 __Assignable。 +生成器的复制或赋值将会复制其内部状态,因此原有生成器和副本将会生成完全相同 的随机数序列。这种行为往往不是需要的。 +特别注意标准库中的算法,如 `std::generate`。它们取函数对象的值作为参数,因 此会调用复制构造函数。

 The following table gives an overview of some characteristics of the
 generators. The cycle length is a rough estimate of the quality of the
 generator; the approximate relative speed is a performance measure, higher
-numbers mean faster random number generation.
-
-[table generators
- [[generator] [length of cycle] [approx. memory requirements] [approx. speed compared to fastest] [comment]]
+numbers mean faster random number generation.\n
+下表给出了生成器某些性质的概览。循环长度是给出了生成器性质的粗略描述;相对 速度是性能的量度,值越大表示随机数生成越快。
+
+[table generators 生成器
+ [[generator 生成器] [length of cycle 循环长度] [approx. memory requirements 近似内存需求] [approx. speed compared to fastest 近似相对速度] [comment 备注]] [[__minstd_rand0] [2[sup 31]-2] [`sizeof(int32_t)`] [[minstd_rand0_speed]] [-]] [[__minstd_rand] [2[sup 31]-2] [`sizeof(int32_t)`] [[minstd_rand_speed]] [-]]
   [[__rand48][2[sup 48]-1] [`sizeof(uint64_t)`] [[rand48_speed]] [-]]
[[__ecuyer1988] [approx. 2[sup 61]] [`2*sizeof(int32_t)`] [[ecuyer_combined_speed]] [-]] [[__kreutzer1986] [?] [`1368*sizeof(uint32_t)`] [[kreutzer1986_speed]] [-]]
   [[__taus88] [~2[sup 88]] [`3*sizeof(uint32_t)`] [[taus88_speed]] [-]]
- [[__hellekalek1995] [2[sup 31]-1] [`sizeof(int32_t)`] [[hellekalek1995__inversive__speed]] [good uniform distribution in several dimensions]] - [[__mt11213b] [2[sup 11213]-1] [`352*sizeof(uint32_t)`] [[mt11213b_speed]] [good uniform distribution in up to 350 dimensions]] - [[__mt19937] [2[sup 19937]-1] [`625*sizeof(uint32_t)`] [[mt19937_speed]] [good uniform distribution in up to 623 dimensions]] + [[__hellekalek1995] [2[sup 31]-1] [`sizeof(int32_t)`] [[hellekalek1995__inversive__speed]] [good uniform distribution in several dimensions\n
+  在几个维度中有很好的均匀分布]]
+ [[__mt11213b] [2[sup 11213]-1] [`352*sizeof(uint32_t)`] [[mt11213b_speed]] [good uniform distribution in up to 350 dimensions\n
+  在多达350个维度中有很好的均匀分布]]
+ [[__mt19937] [2[sup 19937]-1] [`625*sizeof(uint32_t)`] [[mt19937_speed]] [good uniform distribution in up to 623 dimensions\n
+  在多达623个维度中有很好的均匀分布]]
[[__lagged_fibonacci607] [~2[sup 32000]] [`607*sizeof(double)`] [[lagged_fibonacci607_speed]] [-]] [[__lagged_fibonacci1279] [~2[sup 67000]] [`1279*sizeof(double)`] [[lagged_fibonacci1279_speed]] [-]] [[__lagged_fibonacci2281] [~2[sup 120000]] [`2281*sizeof(double)`] [[lagged_fibonacci2281_speed]] [-]]
@@ -77,12 +93,17 @@
 programmer to optimize the trade-off with regard to his application domain.
 Additionally, employing several fundamentally different random number
 generators for a given application of Monte Carlo simulation will improve
-the confidence in the results.
+the confidence in the results.\n
+可以从上表中观察到,选择随机数生成器时往往要在品质、性能、内存三者之间作出 权衡。
+本库中提供的大量生成器足以让程序员选择最适合自己应用领域的一个。
+此外,在 Monte Carlo 模拟中使用多个有着根本性不同的随机数生成器将会提高结果 的可信度。

 If the names of the generators don't ring any bell and you have no idea
which generator to use, it is reasonable to employ __mt19937 for a start: It
-is fast and has acceptable quality.
+is fast and has acceptable quality.\n
+如果你不知如何选择,不妨先使用 __mt19937:它快速、可靠。

[note These random number generators are not intended for use in applications
 where non-deterministic random numbers are required. See __random_device
-for a choice of (hopefully) non-deterministic random number generators.]
+for a choice of (hopefully) non-deterministic random number generators.\n
+以上随机数生成器不能用于要求使用不确定随机数的应用领域;关于不确定随机数生 成器,参看 __random_device。]
=======================================
--- /trunk/libs/random/doc/performance.qbk      Mon May 31 00:54:22 2010
+++ /trunk/libs/random/doc/performance.qbk      Sun Jun 27 21:20:29 2010
@@ -10,7 +10,9 @@
 consideration when choosing a random number generator or a particular
 distribution function. This page provides numerous performance tests with
 the wide variety of generators and distributions available in the boost
-library.
+library.\n
+对于某些人来说,在选择一个随机数生成器或特定的分布函数时,随机数生成的性能 是重要的考虑。
+本节提供了 boost 库中各种生成器和分布的性能测试结果。

 The performance has been evaluated on an Intel(R) Xeon(TM) MP
 CPU 3.66GHz, Gentoo Base System release 1.12.11.1, GCC 4.3.2,
@@ -18,13 +20,17 @@
 @2.33 Ghz with Microsoft Windows XP Professional, Service Pack 2 Build
 2600, Microsoft Visual C++ 2008 9.0.21022.
 The speed is reported in million random numbers
-per second (M rn/sec), generated in a tight loop.
+per second (M rn/sec), generated in a tight loop.\n
+性能测试是在一个 Intel(R) Xeon(TM) MP CPU 3.66GHz, Gentoo Base System release 1.12.11.1, GCC 4.3.2, glibc 2.9 +和一个 Intel(R) Core(TM)2 CPU T7600@xxxx Ghz with Microsoft Windows XP Professional, Service Pack 2 Build +2600, Microsoft Visual C++ 2008 9.0.21022 上进行的。速度的单位为兆随机数每 秒,由一个紧凑的循环测定的。

 [include generator_performance_linux.qbk]
 [include generator_performance_windows.qbk]

 Note that the lagged Fibonacci and ranlux_01 generators produce
-floating-point numbers, whereas all others produce integers.
+floating-point numbers, whereas all others produce integers.\n
+注意,lagged-Fibonacci 和 ranlux_01 生成器产生的是浮点数,而其它的生成器产 生整数。

 [include distribution_performance_linux.qbk]
 [include distribution_performance_windows.qbk]
=======================================
--- /trunk/libs/random/doc/random.qbk   Mon May 31 00:54:22 2010
+++ /trunk/libs/random/doc/random.qbk   Sun Jun 27 21:20:29 2010
@@ -75,18 +75,23 @@

 [include performance_data.qbk]

-[section Introduction]
+[section:introduction Introduction 介绍]

 Random numbers are useful in a variety of applications. The Boost Random
 Number Library (Boost.Random for short) provides a variety of
 [generators generators] and [distributions distributions] to produce
-random numbers having useful properties, such as uniform distribution.
+random numbers having useful properties, such as uniform distribution.\n
+很多应用都需要随机数。Boost 随机数库 (Boost.Random) 提供了多个 [generators 生成器] 和 [distributions 分布],
+可以产生多种有用的随机数,例如正态分布。

You should read the [concepts concepts documentation] for an introduction and the
 definition of the basic concepts. For a quick start, it may be sufficient
-to have a look at [@boost:/libs/random/example/random_demo.cpp random_demo.cpp].
-
-For a very quick start, here's an example:
+to have a look at [@boost:/libs/random/example/random_demo.cpp random_demo.cpp].\n +请先阅读 [concepts 概念文档],熟悉一下基本概念。如果你想要尽快开始,不妨看
+[@boost:/libs/random/example/random_demo.cpp random_demo.cpp]。
+
+For a very quick start, here's an example:\n
+为了尽快开始,下面提供一个例子:

``[classref boost::mt19937]`` rng; // produces randomness out of thin air // see pseudo-random number generators
@@ -98,21 +103,21 @@

 [endsect]

-[section Tutorial]
+[section:tutorial Tutorial 指南]
 [include tutorial.qbk]
 [endsect]

-[section Reference]
-
-[section Concepts]
+[section:reference Reference 参考]
+
+[section:concepts Concepts 概念]
 [include concepts.qbk]
 [endsect]

-[section Generators]
+[section:generators Generators 生成器]
 [include generators.qbk]
 [endsect]

-[section Distributions]
+[section:distributions Distributions 分布]
 [include distributions.qbk]
 [endsect]

@@ -120,48 +125,62 @@

 [endsect]

-[section Performance]
+[section:performance Performance 性能]
 [include performance.qbk]
 [endsect]

-[section Rationale]
+[section:rationale Rationale 原理]

The methods for generating and evaluating deterministic and non-deterministic
 random numbers differ radically. Furthermore, due to the inherent
 deterministic design of present-day computers, it is often difficult to
 implement non-deterministic random number generation facilities. Thus, the
random number library is split into separate header files, mirroring the two
-different application domains.
+different application domains.\n
+用于产生确定的和不确定的随机数的方法有根本的不同。由于计算机确定的本性,实 现不确定的随机数生成设施往往很困难。
+因此,随机数库被分成了两部分,以反映两个不同的应用领域。

 [endsect]

-[section History and Acknowledgements]
+[section:history_and_acknowledgements History and Acknowledgements 历史与鸣 谢]

 In November 1999, Jeet Sukumaran proposed a framework based on virtual
 functions, and later sketched a template-based approach. Ed Brey pointed
 out that Microsoft Visual C++ does not support in-class member
initializations and suggested the enum workaround. Dave Abrahams highlighted
-quantization issues.
+quantization issues.\n
+1999 年 11 月,Jeet Sukumaran 提出了一个基于虚函数的框架,不久做出了一个基 于模板的原型。 +Ed Brey 指出 Microsoft Visual C++ 不支持类内成员初始化,并建议采用 enum 来 绕过这个问题。Dave Abrahams 指出了量子化问题。

 The first public release of this random number library materialized in
 March 2000 after extensive discussions on the boost mailing list. Many
 thanks to Beman Dawes for his original min_rand class, portability fixes,
 documentation suggestions, and general guidance. Harry Erwin sent a header
 file which provided additional insight into the requirements. Ed Brey and
-Beman Dawes wanted an iterator-like interface.
+Beman Dawes wanted an iterator-like interface.\n
+2000 年 3 月,经过 boost 邮件列表的多方面讨论,决定首次释出本随机数库。
+感谢 Beman Dawes 提供最初的 min_rand 类、可移植性修正、文档建议和一般的指 导。 +Harry Erwin 提供的头文件揭示出了更多的需求。Ed Brey 和 Beman Dawes 提出需要 一个类迭代器的接口。

 Beman Dawes managed the formal review, during which Matthias Troyer,
 Csaba Szepesvari, and Thomas Holenstein gave detailed comments. The
-reviewed version became an official part of boost on 17 June 2000.
+reviewed version became an official part of boost on 17 June 2000.\n
+Beman Dawes 组织了正式审核。其间 Matthias Troyer, Csaba Szepesvari 和 Thomas Holenstein 提供了详尽的评论。
+审核通过的版本在 2000 年 6 月 17 日正式成为了 boost 的一部分。

 Gary Powell contributed suggestions for code cleanliness. Dave Abrahams
 and Howard Hinnant suggested to move the basic generator templates from
-`namespace boost::detail` to `boost::random`.
+`namespace boost::detail` to `boost::random`.\n
+Gary Powell 贡献了关于代码清洁性的建议。
+Dave Abrahams 和 Howard Hinnant 建议把基本的生成器模板从 `namespace boost::detail` 移至 `boost::random`。

 Ed Brey asked to remove superfluous warnings and helped with `uint64_t`
 handling. Andreas Scherer tested with MSVC. Matthias Troyer contributed
 a [headerref boost/random/lagged_fibonacci.hpp lagged Fibonacci generator].
 Michael Stevens found a bug in the copy semantics of __normal_distribution
-and suggested documentation improvements.
+and suggested documentation improvements.\n
+Ed Brey 要求移除了多余的警告并帮助解决了 `uint64_t` 处理问题。Andreas Scherer 在 MSVC 上测试了本库。 +Matthias Troyer 贡献了一个 [headerref boost/random/lagged_fibonacci.hpp lagged-Fibonacci 生成器]。 +Michael Stevens 发现了 __normal_distribution 复制语义中的 bug,并对文档改进 提出了若干建议。

 [endsect]
=======================================
--- /trunk/libs/random/doc/random_number_generator.qbk Mon May 31 00:54:22 2010 +++ /trunk/libs/random/doc/random_number_generator.qbk Sun Jun 27 21:20:29 2010
@@ -36,12 +36,16 @@

 Instantiations of class template random_number_generator model a
 RandomNumberGenerator (std:25.2.11 [lib.alg.random.shuffle]). On each
-invocation, it returns a uniformly distributed integer in the range [0..n).
-
-The template parameter IntType shall denote some integer-like value type.
+invocation, it returns a uniformly distributed integer in the range [0..n).\n +类模板 random_number_generator 的实例是 RandomNumberGenerator (std:25.2.11 [lib.alg.random.shuffle]) 模型。
+每一次调用,它都返回一个在区间 [0..n) 中均匀分布的整数。
+
+The template parameter IntType shall denote some integer-like value type.\n
+模板参数 IntType 应表示某种类似于整数的值类型。

 [note I consider it unfortunate that the C++ Standard uses the name
-RandomNumberGenerator for something rather specific.]
+RandomNumberGenerator for something rather specific.\n
+我认为 C++ 标准将名字 RandomNumberGenerator 用于这么具体的东西是不幸的。]

 [endsect]

=======================================
--- /trunk/libs/random/doc/tutorial.qbk Mon May 31 00:54:22 2010
+++ /trunk/libs/random/doc/tutorial.qbk Sun Jun 27 21:20:29 2010
@@ -6,14 +6,14 @@
  / http://www.boost.org/LICENSE_1_0.txt)
 ]

-[section Generating integers in a range]
+[section:generating_integers_in_a_range Generating integers in a range 生成 指定范围内的整数]

 [import ../example/die.cpp]
 [die]

 [endsect]

-[section Generating integers with different probabilities]
+[section:generating_integers_with_different_probabilities Generating integers with different probabilities 以不同概念生成整数]

 [import ../example/weighted_die.cpp]
 [weighted_die]

Other related posts:

  • » [boost-doc-zh] r418 committed - 翻译 random 库的 qbk 文件 - boost-doc-zh