GSL(GNU Scientific Library)參考手冊/隨機數發生器

維基教科書,自由的教學讀本
跳至導覽 跳至搜尋

隨機數發生器[編輯]

本庫提供了一批隨機數發生器,它們可由一個通用接口訪問。可以通過環境變量實時的選擇不同的隨機數發生器和隨機數種子,以便在不同的生成器間切換,而不必重新編譯。 Each instance of a generator keeps track of its own state, allowing the generators to be used in multi-threaded programs. Additional functions are available for transforming uniform random numbers into samples from continuous or discrete probability distributions such as the Gaussian, log-normal or Poisson distributions.

這些函數在頭文件 gsl_rng.h 中聲明。