This section is empty.


This section is empty.


func RouletteDrawN

func RouletteDrawN(p []float64, n int) ([]int, error)

    RouletteDrawN draws n numbers randomly from a probability mass function (PMF) defined by weights in p. RouletteDrawN implements the Roulette Wheel Draw a.k.a. Fitness Proportionate Selection: - - It returns a slice of n indices into the vector p. It fails with error if p is empty or nil.

    func WithCovN

    func WithCovN(cov mat.Symmetric, n int) (*mat.Dense, error)

      WithCovN draws n random samples from a zero-mean Normal (aka Gaussian) distribution with covariance cov. It returns matrix which contains the randomly generated samples stored in its columns. It fails with error if n is non-positive and/or smaller than 1 or if SVD factorization of cov fails.


      This section is empty.

      Source Files