public static void FillNormals(double[] toFill, IntelMKLRandomNumberStream randomStream, int startIndex, int variateCount) { // method can be 0 - BoxMuller, 1 - BoxMuller2 or 3 - ICDF int status; fixed (double* p = &toFill[startIndex]) { status = vdRngGaussian(1, randomStream.RandomStream, variateCount, p, 0, 1); } if (status != 0) throw new Exception("Normal number generation failed."); }
public static void FillNormals(double[] toFill, IntelMKLRandomNumberStream randomStream, int startIndex, int variateCount) { // method can be 0 - BoxMuller, 1 - BoxMuller2 or 3 - ICDF int status; fixed(double *p = &toFill[startIndex]) { status = vdRngGaussian(1, randomStream.RandomStream, variateCount, p, 0, 1); } if (status != 0) { throw new Exception("Normal number generation failed."); } }
public static void FillNormals(double[] toFill, IntelMKLRandomNumberStream randomStream) { FillNormals(toFill, randomStream, 0, toFill.Length); }
public static void FillNormals(double[] toFill, IntelMKLRandomNumberStream randomStream) { FillNormals(toFill, randomStream, 0, toFill.Length); }