Documentation ¶
Overview ¶
Random numbers generator
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GaussRand ¶
func GaussRand() float64
Same as Generator.GaussRand () with the default generator.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func (*Generator) GaussRand ¶
Generates a new pseudo-random real number x with gaussian (normal) deviates. Probability distribution p(x) = 1 / sqrt(2 * pi) * exp(-x^2 / 2). Box-Muller method.
func (*Generator) IntRand ¶
Generates a new integer number between min (included) and max (excluded)
func (*Generator) Random ¶
Generates a new pseudo-random real number x such that (0 <= x < 1), with uniforme deviates. (Period > 2 × 10^18). Ref.: Generator ran2, W. H. Press, S. A. Teukolsky, W. T. Vetterling, B. P. Flannery, Numerical Recipes, The Art of Scientific Computing, second edition, 1997.
Click to show internal directories.
Click to hide internal directories.