Open pedro-andrade-inpe opened 9 years ago
Doesn't make sense to have this parameter and also doesn't have any sense to have several algorithms to generate random number. You just need a very good algorithm which must be proven tp generate uniformly distributed numbers. Then, you may use this generator to implement random numbers in several distributions. Since each distribution have different parameters, the kind argument won't be so useful.
I suggest we use the sintax below for providing random numbers in several distributions. Let rand be a Random object from TerraME
rand:normal(mean, std)
rand:exponential(lambda)
rand:poisson (alfa)
Actually, I have implemented some different distributions for TerraME from the mersene twister algorithm. Please, se the file attached.
Add a parameter 'kind' to Random that indicates the random number generator to be used. This will let the user to select the one that fits in with the objective of the model to be implemented. "lcg" (Linear congruential generator), "mwc", (Multiply-with-carry), and "mt" (Mersenne twister) are some of the options. The documentation should describe the advantages and disadvantages of each.
— Reply to this email directly or view it on GitHub https://github.com/TerraME/terrame/issues/773.
attached
Prof. Dr. Tiago Garcia de Senna Carneiro TerraLAB - Earth System Modelling and Simulation Laboratory Computer Science Department, UFOP - Federal University of Ouro Preto
Campus Universitário Morro do Cruzeiro, Ouro Preto - MG, Brazil, 35400-000 +55 31 3559 1692 +55 31 3559 1253 www.terralab.ufop.br www.decom.ufop.br
2015-11-05 16:59 GMT-02:00 Tiago Garcia de Senna Carneiro < tiagogsc@gmail.com>:
Doesn't make sense to have this parameter and also doesn't have any sense to have several algorithms to generate random number. You just need a very good algorithm which must be proven tp generate uniformly distributed numbers. Then, you may use this generator to implement random numbers in several distributions. Since each distribution have different parameters, the kind argument won't be so useful.
I suggest we use the sintax below for providing random numbers in several distributions. Let rand be a Random object from TerraME
rand:normal(mean, std)
rand:exponential(lambda)
rand:poisson (alfa)
Actually, I have implemented some different distributions for TerraME from the mersene twister algorithm. Please, se the file attached.
Add a parameter 'kind' to Random that indicates the random number generator to be used. This will let the user to select the one that fits in with the objective of the model to be implemented. "lcg" (Linear congruential generator), "mwc", (Multiply-with-carry), and "mt" (Mersenne twister) are some of the options. The documentation should describe the advantages and disadvantages of each.
— Reply to this email directly or view it on GitHub https://github.com/TerraME/terrame/issues/773.
Add a parameter 'kind' to Random that indicates the random number generator to be used. This will let the user to select the one that fits in with the objective of the model to be implemented. "lcg" (Linear congruential generator), "mwc", (Multiply-with-carry), and "mt" (Mersenne twister) are some of the options. The documentation should describe the advantages and disadvantages of each.