PHP.mk документација

stats_rand_setall

Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.

function.stats-rand-setall.php PHP.net прокси Преводот се освежува
Оригинал на PHP.net
Патека function.stats-rand-setall.php Локална патека за оваа страница.
Извор php.net/manual/en Оригиналниот HTML се реупотребува и локално се стилизира.
Режим Прокси + превод во позадина Кодовите, табелите и белешките остануваат читливи во истиот тек.
stats_rand_setall

Референца за `function.stats-rand-setall.php` со подобрена типографија и навигација.

function.stats-rand-setall.php

stats_rand_setall

(PECL stats >= 1.0.0)

stats_rand_setallSet seed values to the random generator

= NULL

stats_rand_setall(int $iseed1, int $iseed2): void

Постави iseed1 and iseed2 as seed values to the random generator used in statistic functions.

Параметри

iseed1

The value which is used as the random seed

iseed2

The value which is used as the random seed

Вратени вредности

No values are returned.

Белешки од корисници 1 белешка

џефриј точка ли на gmail точка com
пред 9 години
tl;dr - This random number generator is implemented using linear congruential generators. The arguments iseed1 and iseed2 each expect a 32-bit integer.

I can't believe this PECL package has such terrible documentation that I have to dig into the C source code to figure out how to use it.

Documentation from PECL source, lines 246-262 of "com.c" found at:
http://git.php.net/?p=pecl/math/stats.git;a=blob;f=com.c;h=7740ac636969e500254c61697125dfa8857dd715;hb=refs/heads/master

/*
**********************************************************************
void setall(long iseed1,long iseed2)
          SET ALL random number generators
Sets the initial seed of generator 1 to ISEED1 and ISEED2. The
initial seeds of the other generators are set accordingly, and
all generators states are set to these seeds.
This is a transcription from Pascal to Fortran of routine
Set_Initial_Seed from the paper
L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
with Splitting Facilities." ACM Transactions on Mathematical
Software, 17:98-111 (1991)
                         Arguments
iseed1 -> First of two integer seeds
iseed2 -> Second of two integer seeds
**********************************************************************
*/

Looking further into the referenced paper, we see:

PROCEDURE Set_lnitiaI_Seed (S1, S2 INTEGER);
Resets the initial seed of generator 1 to the values S1 and S2, which must satisfy: 1 <= S1 <= 2147483562 and 1 <= S2 <= 2147483398. The initial seeds of all other generators are recomputed accordingly, and all generator’s states are reset to these initial seeds. This procedure is called automatically at the beginning of program execution, with (default) parameter values S1 = 1234567890 and S2 = 123456789.
Навигација

Прелистувај сродни теми и функции.

На оваа страница

Автоматски outline од активната документација.

Насловите ќе се појават тука по вчитување.

Попрегледно читање

Примерите, changelog табелите и user notes се визуелно издвоени за да не се губат во долгата содржина.

Брз совет Користи го outline-от Скокни директно на главните секции од активната страница.
Извор Оригиналниот линк останува достапен Кога ти треба целосен upstream context, отвори го PHP.net во нов tab.