/// <summary> /// Computes the Cholesky decomposition for a matrix. /// </summary> /// <param name="matrix">The matrix to factor.</param> /// <returns>The Cholesky decomposition object.</returns> public static Cholesky Cholesky(this Matrix <float> matrix) { return((Cholesky)Cholesky <float> .Create(matrix)); }
/// <summary> /// Computes the Cholesky decomposition for a matrix. /// </summary> /// <param name="matrix">The matrix to factor.</param> /// <returns>The Cholesky decomposition object.</returns> public static Cholesky Cholesky(this Matrix <Complex32> matrix) { return((Cholesky)Cholesky <Complex32> .Create(matrix)); }
/// <summary> /// Samples a vector normal distributed random variable. /// </summary> /// <param name="rnd">The random number generator to use.</param> /// <param name="mean">The mean of the vector normal distribution.</param> /// <param name="covariance">The covariance matrix of the vector normal distribution.</param> /// <returns>a sequence of samples from defined distribution.</returns> private static Vector <double> SampleVectorNormal(Random rnd, Vector <double> mean, Matrix <double> covariance) { var chol = Cholesky <double> .Create(covariance); return(SampleVectorNormal(rnd, mean, chol)); }