// Rand generates a random number according to the distribution. // If the input slice is nil, new memory is allocated, otherwise the result is stored // in place. func (n *Normal) Rand(x []float64) []float64 { // CovarianceMatrix returns the covariance matrix calculated from a matrix of data, x. // // If cov is not nil it must either be zero-sized or have the same number of // columns as the input data matrix. cov will be used as the destination for // the covariance data. If cov is nil, a new mat.SymDense is allocated for // the destination. func CovarianceMatrix(cov *mat.SymDense, x mat.Matrix, weights []float64) *mat.SymDense {