I think this algorithm works directly with the covariance matrix (as input argument) which makes it nice and rather easy to work with, but not the most efficient for repeated random-number generations from the same distribution. As I said before in another comment, the most efficient method is to pass the Cholesky factorization to the procedure rather than passing the covariance matrix (which would require the factorization computation on each and every call to the procedure). Here is an implementation that takes the Cholesky Factorization instead of the covariance matrix.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Is there a gaussian random number generator which can generate n gaussian variables very fast?
|
3 | 1736 | October 29, 2021 | |
What random number generator is the best/fastest or do you use?
|
22 | 4356 | September 18, 2021 | |
Normal random number generator | 21 | 4585 | June 14, 2022 | |
Lapack dtrtrs doubts | 14 | 525 | May 20, 2024 | |
Lib for partial SVD computation | 10 | 1041 | September 23, 2020 |