Skip to content

Commit cf96daf

Browse files
TimWollaGirgias
andauthored
random: Add description to the jumping methods of Xoshiro256StarStar (#1991)
* random: Add description to the jumping methods of Xoshiro256StarStar * random: Improve explanation of Xoshiro jumping Co-authored-by: George Peter Banyard <[email protected]> Co-authored-by: George Peter Banyard <[email protected]>
1 parent af154fb commit cf96daf

File tree

2 files changed

+37
-8
lines changed

2 files changed

+37
-8
lines changed

reference/random/random/engine/xoshiro256starstar/jump.xml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,17 @@
1212
<void />
1313
</methodsynopsis>
1414
<para>
15-
15+
Moves the algorithm’s state ahead by 2<superscript>128</superscript> steps, as if
16+
<function>Random\Engine\Xoshiro256StarStar::generate</function> was called
17+
2<superscript>128</superscript> times.
18+
</para>
19+
<para>
20+
The purpose of a jump is to facilitate the creation of a new <classname>Random\Engine\Xoshiro256StarStar</classname>
21+
engine from an existing seeded <classname>Random\Engine\Xoshiro256StarStar</classname> engine.
22+
The seeded engine acts as a blueprint, which can be <link linkend="language.oop5.cloning">cloned</link>
23+
and repeatedly jumped to create 2<superscript>128</superscript> non-overlapping sequences with
24+
2<superscript>128</superscript> values each.
1625
</para>
17-
18-
&warn.undocumented.func;
19-
2026
</refsect1>
2127

2228
<refsect1 role="parameters">
@@ -53,6 +59,12 @@
5359
</example>
5460
</refsect1>
5561

62+
<refsect1 role="seealso">
63+
&reftitle.seealso;
64+
<simplelist>
65+
<member><function>Random\Engine\Xoshiro256StarStar::jumpLong</function></member>
66+
</simplelist>
67+
</refsect1>
5668

5769
</refentry>
5870
<!-- Keep this comment at the end of the file

reference/random/random/engine/xoshiro256starstar/jumplong.xml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,22 @@
1212
<void />
1313
</methodsynopsis>
1414
<para>
15-
15+
Moves the algorithm’s state ahead by 2<superscript>192</superscript> steps, as if
16+
<function>Random\Engine\Xoshiro256StarStar::generate</function> was called
17+
2<superscript>192</superscript> times.
18+
</para>
19+
<para>
20+
The purpose of a long jump is to facilitate the creation of a new <classname>Random\Engine\Xoshiro256StarStar</classname>
21+
engine from an existing seeded <classname>Random\Engine\Xoshiro256StarStar</classname> engine.
22+
The seeded engine acts as a blueprint, which can be <link linkend="language.oop5.cloning">cloned</link>
23+
and repeatedly jumped to create 2<superscript>64</superscript> non-overlapping sequences with
24+
2<superscript>192</superscript> values each.
25+
</para>
26+
<para>
27+
Long jumping may be combined with <function>Random\Engine\Xoshiro256StarStar::jump</function>ing
28+
to further split each of the 2<superscript>64</superscript> sequences generated by long jumping,
29+
into 2<superscript>128</superscript> sequences of 2<superscript>64</superscript> values each.
1630
</para>
17-
18-
&warn.undocumented.func;
19-
2031
</refsect1>
2132

2233
<refsect1 role="parameters">
@@ -53,6 +64,12 @@
5364
</example>
5465
</refsect1>
5566

67+
<refsect1 role="seealso">
68+
&reftitle.seealso;
69+
<simplelist>
70+
<member><function>Random\Engine\Xoshiro256StarStar::jump</function></member>
71+
</simplelist>
72+
</refsect1>
5673

5774
</refentry>
5875
<!-- Keep this comment at the end of the file

0 commit comments

Comments
 (0)