nullmatrix.clear();
//zero-fill the null matrix
nullmatrix.assign(nrows, vector<int>(ncols, 0));
nullmatrix.clear();
//zero-fill the null matrix
nullmatrix.assign(nrows, vector<int>(ncols, 0));
randnum = rand() / double(RAND_MAX);
for(int j=0;j<ncols;j++) {
current = probabilityMatrix[ncols * i + j];
randnum = rand() / double(RAND_MAX);
for(int j=0;j<ncols;j++) {
current = probabilityMatrix[ncols * i + j];