Skip to content

Commit c7e5d5d

Browse files
feat(doc): translate page random + spl (#231)
1 parent f62f127 commit c7e5d5d

67 files changed

Lines changed: 6645 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

reference/random/book.xml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- EN-Revision: 550b9c3c31a66c18c9303794c12260bf5c684fed Maintainer: PhilDaiguille Status: ready -->
3+
<!-- Reviewed: no -->
4+
<book xml:id="book.random" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
<?phpdoc extension-membership="core" ?>
6+
<title>Generadores de números aleatorios y funciones relacionadas con la aleatoriedad.</title>
7+
<titleabbrev>Random</titleabbrev>
8+
9+
<preface xml:id="intro.random">
10+
&reftitle.intro;
11+
<para>
12+
13+
</para>
14+
</preface>
15+
16+
&reference.random.constants;
17+
&reference.random.examples;
18+
&reference.random.reference;
19+
20+
&reference.random.random.randomizer;
21+
&reference.random.random.intervalboundary;
22+
23+
&reference.random.random.engine;
24+
&reference.random.random.cryptosafeengine;
25+
26+
&reference.random.random.engine.secure;
27+
&reference.random.random.engine.mt19937;
28+
&reference.random.random.engine.pcgoneseq128xslrr64;
29+
&reference.random.random.engine.xoshiro256starstar;
30+
31+
&reference.random.random.randomerror;
32+
&reference.random.random.brokenrandomengineerror;
33+
&reference.random.random.randomexception;
34+
35+
</book>
36+
<!-- Keep this comment at the end of the file
37+
Local variables:
38+
mode: sgml
39+
sgml-omittag:t
40+
sgml-shorttag:t
41+
sgml-minimize-attributes:nil
42+
sgml-always-quote-attributes:t
43+
sgml-indent-step:1
44+
sgml-indent-data:t
45+
indent-tabs-mode:nil
46+
sgml-parent-document:nil
47+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
48+
sgml-exposed-tags:nil
49+
sgml-local-catalogs:nil
50+
sgml-local-ecat-files:nil
51+
End:
52+
vim600: syn=xml fen fdm=syntax fdl=2 si
53+
vim: et tw=78 syn=sgml
54+
vi: ts=1 sw=1
55+
-->

reference/random/constants.xml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- EN-Revision: c4f24e2eef1a3c970c491c0ee8cbc1f290ff023a Maintainer: PhilDaiguille Status: ready -->
3+
<!-- Reviewed: no -->
4+
<appendix xml:id="random.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
&reftitle.constants;
6+
&extension.constants.core;
7+
<para>
8+
<variablelist>
9+
<varlistentry xml:id="constant.mt-rand-mt19937">
10+
<term>
11+
<constant>MT_RAND_MT19937</constant>
12+
(<type>int</type>)
13+
</term>
14+
<listitem>
15+
<simpara>
16+
Indica que la implementación correcta de <link xlink:href="&url.random.mersenne-twister;">Mt19937</link> (Mersenne Twister)
17+
será utilizada por el algoritmo al crear una instancia de <classname>Random\Engine\Mt19937</classname>
18+
utilizando <function>Random\Engine\Mt19937::__construct</function> o al inicializar el Mersenne Twister global
19+
con <function>mt_srand</function>.
20+
</simpara>
21+
</listitem>
22+
</varlistentry>
23+
<varlistentry xml:id="constant.mt-rand-php">
24+
<term>
25+
<constant>MT_RAND_PHP</constant>
26+
(<type>int</type>)
27+
</term>
28+
<listitem>
29+
<simpara>
30+
Indica que una implementación incorrecta de Mersenne Twister será utilizada por el algoritmo, al
31+
crear una instancia de <classname>Random\Engine\Mt19937</classname> utilizando
32+
<function>Random\Engine\Mt19937::__construct</function> o al inicializar el Mersenne Twister global
33+
con <function>mt_srand</function>.
34+
</simpara>
35+
<simpara>
36+
La implementación incorrecta está disponible para garantizar la compatibilidad ascendente con
37+
<function>mt_srand</function> anterior a PHP 7.1.0.
38+
</simpara>
39+
&warn.deprecated.feature-8-3-0;
40+
</listitem>
41+
</varlistentry>
42+
</variablelist>
43+
</para>
44+
</appendix>
45+
<!-- Keep this comment at the end of the file
46+
Local variables:
47+
mode: sgml
48+
sgml-omittag:t
49+
sgml-shorttag:t
50+
sgml-minimize-attributes:nil
51+
sgml-always-quote-attributes:t
52+
sgml-indent-step:1
53+
sgml-indent-data:t
54+
indent-tabs-mode:nil
55+
sgml-parent-document:nil
56+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
57+
sgml-exposed-tags:nil
58+
sgml-local-catalogs:nil
59+
sgml-local-ecat-files:nil
60+
End:
61+
vim600: syn=xml fen fdm=syntax fdl=2 si
62+
vim: et tw=78 syn=sgml
63+
vi: ts=1 sw=1
64+
-->

reference/random/examples.xml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- EN-Revision: 2166824858a40ea664c558f2930b63b8f4fd89c6 Maintainer: PhilDaiguille Status: ready -->
3+
<!-- Reviewed: no -->
4+
<chapter xml:id="random.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
&reftitle.examples;
6+
<example>
7+
<title>Ejemplo Random</title>
8+
<programlisting role="php">
9+
<![CDATA[
10+
<?php
11+
12+
/* ... */
13+
14+
?>
15+
]]>
16+
</programlisting>
17+
&example.outputs.similar;
18+
<screen>
19+
<![CDATA[
20+
...
21+
]]>
22+
</screen>
23+
</example>
24+
</chapter>
25+
<!-- Keep this comment at the end of the file
26+
Local variables:
27+
mode: sgml
28+
sgml-omittag:t
29+
sgml-shorttag:t
30+
sgml-minimize-attributes:nil
31+
sgml-always-quote-attributes:t
32+
sgml-indent-step:1
33+
sgml-indent-data:t
34+
indent-tabs-mode:nil
35+
sgml-parent-document:nil
36+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
37+
sgml-exposed-tags:nil
38+
sgml-local-catalogs:nil
39+
sgml-local-ecat-files:nil
40+
End:
41+
vim600: syn=xml fen fdm=syntax fdl=2 si
42+
vim: et tw=78 syn=sgml
43+
vi: ts=1 sw=1
44+
-->
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
<!-- EN-Revision: 2166824858a40ea664c558f2930b63b8f4fd89c6 Maintainer: PhilDaiguille Status: ready -->
4+
<!-- Reviewed: no -->
5+
6+
<refentry xml:id="function.getrandmax" xmlns="http://docbook.org/ns/docbook">
7+
<refnamediv>
8+
<refname>getrandmax</refname>
9+
<refpurpose>Valor aleatorio máximo posible</refpurpose>
10+
</refnamediv>
11+
<refsect1 role="description">
12+
&reftitle.description;
13+
<methodsynopsis>
14+
<type>int</type><methodname>getrandmax</methodname>
15+
<void/>
16+
</methodsynopsis>
17+
<simpara>
18+
Devuelve el valor aleatorio máximo posible
19+
retornado por <function>rand</function>.
20+
</simpara>
21+
</refsect1>
22+
23+
<refsect1 role="parameters">
24+
&reftitle.parameters;
25+
&no.function.parameters;
26+
</refsect1>
27+
28+
<refsect1 role="returnvalues">
29+
&reftitle.returnvalues;
30+
<para>
31+
El valor aleatorio máximo posible retornado por <function>rand</function>.
32+
</para>
33+
</refsect1>
34+
<refsect1 role="seealso">
35+
&reftitle.seealso;
36+
<para>
37+
<simplelist>
38+
<member><function>rand</function></member>
39+
<member><function>srand</function></member>
40+
<member><function>mt_getrandmax</function></member>
41+
</simplelist>
42+
</para>
43+
</refsect1>
44+
</refentry>
45+
46+
<!-- Keep this comment at the end of the file
47+
Local variables:
48+
mode: sgml
49+
sgml-omittag:t
50+
sgml-shorttag:t
51+
sgml-minimize-attributes:nil
52+
sgml-always-quote-attributes:t
53+
sgml-indent-step:1
54+
sgml-indent-data:t
55+
indent-tabs-mode:nil
56+
sgml-parent-document:nil
57+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
58+
sgml-exposed-tags:nil
59+
sgml-local-catalogs:nil
60+
sgml-local-ecat-files:nil
61+
End:
62+
vim600: syn=xml fen fdm=syntax fdl=2 si
63+
vim: et tw=78 syn=sgml
64+
vi: ts=1 sw=1
65+
-->
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
<!-- EN-Revision: 9b1673cf114a1e10c4563ab9223cb56aed552b89 Maintainer: PhilDaiguille Status: ready -->
4+
<!-- Reviewed: no -->
5+
6+
<refentry xml:id="function.lcg-value" xmlns="http://docbook.org/ns/docbook">
7+
<refnamediv>
8+
<refname>lcg_value</refname>
9+
<refpurpose>Generador de congruencia lineal combinada</refpurpose>
10+
</refnamediv>
11+
12+
<refsynopsisdiv>
13+
&warn.deprecated.function-8-4-0;
14+
</refsynopsisdiv>
15+
16+
<refsect1 role="description">
17+
&reftitle.description;
18+
<methodsynopsis>
19+
<modifier role="attribute">#[\Deprecated]</modifier>
20+
<type>float</type><methodname>lcg_value</methodname>
21+
<void/>
22+
</methodsynopsis>
23+
<para>
24+
<function>lcg_value</function> devuelve un número pseudoaleatorio,
25+
comprendido entre 0 y 1. <function>lcg_value</function> combina dos
26+
generadores de congruencia, con períodos respectivos de
27+
<literal>2^31 - 85</literal> y <literal>2^31 - 249</literal>.
28+
El período de esta función es el producto de estos dos
29+
números primos (es decir, <literal>(2^31 - 85)*(2^31 - 249)</literal>).
30+
</para>
31+
&caution.cryptographically-insecure;
32+
<caution>
33+
<para>
34+
Escalar el valor de retorno a un intervalo diferente utilizando la multiplicación
35+
o la adición (una transformación afín) puede provocar un sesgo
36+
en el valor resultante, ya que los números de punto flotante no están distribuidos uniformemente
37+
en la línea numérica.
38+
Como no todos los valores pueden ser representados exactamente por un número de punto flotante, el
39+
resultado de la transformación afín también puede dar valores fuera
40+
del intervalo solicitado.
41+
</para>
42+
<para>
43+
Utilice <methodname>Random\Randomizer::getFloat</methodname> para generar un
44+
número de punto flotante aleatorio en un intervalo arbitrario. Utilice <methodname>Random\Randomizer::getInt</methodname>
45+
para generar un entero aleatorio en un intervalo arbitrario.
46+
</para>
47+
</caution>
48+
</refsect1>
49+
50+
<refsect1 role="parameters">
51+
&reftitle.parameters;
52+
&no.function.parameters;
53+
</refsect1>
54+
55+
<refsect1 role="returnvalues">
56+
&reftitle.returnvalues;
57+
<para>
58+
Un valor pseudoaleatorio, en el intervalo de 0.0 a 1.0 inclusive.
59+
</para>
60+
</refsect1>
61+
62+
<refsect1 role="changelog">
63+
&reftitle.changelog;
64+
<informaltable>
65+
<tgroup cols="2">
66+
<thead>
67+
<row>
68+
<entry>&Version;</entry>
69+
<entry>&Description;</entry>
70+
</row>
71+
</thead>
72+
<tbody>
73+
<row>
74+
<entry>8.4.0</entry>
75+
<entry>
76+
Esta función ha sido deprecada.
77+
</entry>
78+
</row>
79+
</tbody>
80+
</tgroup>
81+
</informaltable>
82+
</refsect1>
83+
84+
<refsect1 role="seealso">
85+
&reftitle.seealso;
86+
<para>
87+
<simplelist>
88+
<member><methodname>Random\Randomizer::getFloat</methodname></member>
89+
<member><methodname>Random\Randomizer::getInt</methodname></member>
90+
<member><function>random_int</function></member>
91+
</simplelist>
92+
</para>
93+
</refsect1>
94+
</refentry>
95+
<!-- Keep this comment at the end of the file
96+
Local variables:
97+
mode: sgml
98+
sgml-omittag:t
99+
sgml-shorttag:t
100+
sgml-minimize-attributes:nil
101+
sgml-always-quote-attributes:t
102+
sgml-indent-step:1
103+
sgml-indent-data:t
104+
indent-tabs-mode:nil
105+
sgml-parent-document:nil
106+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
107+
sgml-exposed-tags:nil
108+
sgml-local-catalogs:nil
109+
sgml-local-ecat-files:nil
110+
End:
111+
vim600: syn=xml fen fdm=syntax fdl=2 si
112+
vim: et tw=78 syn=sgml
113+
vi: ts=1 sw=1
114+
-->

0 commit comments

Comments
 (0)