stats_rand_setall
(PECL stats >= 1.0.0)
stats_rand_setall — Not documented
Description
void stats_rand_setall
( int
$iseed1
, int $iseed2
)Warning
This function is currently not documented; only its argument list is available.
Parameters
-
iseed1
-
-
iseed2
-
Return Values
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Математические расширения
- Статистика
- stats_absolute_deviation
- stats_cdf_beta
- stats_cdf_binomial
- stats_cdf_cauchy
- stats_cdf_chisquare
- stats_cdf_exponential
- stats_cdf_f
- stats_cdf_gamma
- stats_cdf_laplace
- stats_cdf_logistic
- stats_cdf_negative_binomial
- stats_cdf_noncentral_chisquare
- stats_cdf_noncentral_f
- stats_cdf_poisson
- stats_cdf_t
- stats_cdf_uniform
- stats_cdf_weibull
- stats_covariance
- stats_den_uniform
- stats_dens_beta
- stats_dens_cauchy
- stats_dens_chisquare
- stats_dens_exponential
- stats_dens_f
- stats_dens_gamma
- stats_dens_laplace
- stats_dens_logistic
- stats_dens_negative_binomial
- stats_dens_normal
- stats_dens_pmf_binomial
- stats_dens_pmf_hypergeometric
- stats_dens_pmf_poisson
- stats_dens_t
- stats_dens_weibull
- stats_harmonic_mean
- stats_kurtosis
- stats_rand_gen_beta
- stats_rand_gen_chisquare
- stats_rand_gen_exponential
- stats_rand_gen_f
- stats_rand_gen_funiform
- stats_rand_gen_gamma
- stats_rand_gen_ibinomial_negative
- stats_rand_gen_ibinomial
- stats_rand_gen_int
- stats_rand_gen_ipoisson
- stats_rand_gen_iuniform
- stats_rand_gen_noncenral_chisquare
- stats_rand_gen_noncentral_f
- stats_rand_gen_noncentral_t
- stats_rand_gen_normal
- stats_rand_gen_t
- stats_rand_get_seeds
- stats_rand_phrase_to_seeds
- stats_rand_ranf
- stats_rand_setall
- stats_skew
- stats_standard_deviation
- stats_stat_binomial_coef
- stats_stat_correlation
- stats_stat_gennch
- stats_stat_independent_t
- stats_stat_innerproduct
- stats_stat_noncentral_t
- stats_stat_paired_t
- stats_stat_percentile
- stats_stat_powersum
- stats_variance
Коментарии
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.