Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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: - https://en.wikipedia.org/wiki/Fitness_proportionate_selection - http://www.keithschwarz.com/darts-dice-coins/ 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.

      Types

      This section is empty.

      Source Files