Skip to content

Commit

Permalink
Update boot.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
acp29 committed May 11, 2024
1 parent 8cf26ce commit d9cd6ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/boot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void mexFunction (int nlhs, mxArray* plhs[],

// Declare variables
mwSize dims[2] = {static_cast<mwSize>(n), static_cast<mwSize>(nboot)};
plhs[0] = mxCreateNumericArray(2, dims,
plhs[0] = mxCreateNumericArray (2, dims,
mxDOUBLE_CLASS,
mxREAL); // Prepare array for bootstrap sample indices
long long int N = n * nboot; // Total counts of all sample indices
Expand Down Expand Up @@ -201,7 +201,7 @@ void mexFunction (int nlhs, mxArray* plhs[],
double *ptr = (double *) mxGetData(plhs[0]);

// Initialize pseudo-random number generator (Mersenne Twister 19937)
mt19937 rng (rand());
mt19937 rng (rand ());
uniform_int_distribution<int> distr (0, n - 1);

// Perform balanced sampling
Expand Down

0 comments on commit d9cd6ce

Please sign in to comment.