Documentation ¶
Overview ¶
Package rand provides methods for generating random numbers from distributions useful for the differential privacy library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Geometric ¶
func Geometric() float64
Geometric returns a float64 that counts the number of Bernoulli trials until the first success for a success probability of 0.5.
func I63n ¶
I63n returns an integer from the set {0,...,n-1} uniformly at random. The value of n must be positive.
func Normal ¶
func Normal() float64
Normal returns a normally distributed float with mean 0 and standard deviation 1.
func Uniform ¶
func Uniform() float64
Uniform returns a float64 from the interval (0,1] such that each float in the interval is returned with positive probability and the resulting distribution simulates a continuous uniform distribution on (0, 1].
See http://g/go-nuts/GndbDnHKHuw/VNSrkl9vBQAJ for details.
Types ¶
This section is empty.