|
@@ -130,15 +130,9 @@ int execute_random(struct rr_state *theState)
|
|
|
}
|
|
|
|
|
|
for (col = 0; col < ncols && nt; col++) {
|
|
|
- if (!theState->use_nulls && is_null_value(theState->buf, col))
|
|
|
- continue;
|
|
|
- if (theState->docover == TRUE) { /* skip no data cover points */
|
|
|
- if (!theState->use_nulls &&
|
|
|
- is_null_value(theState->cover, col))
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
- if (make_rand() % nc < nt) {
|
|
|
+ if ((theState->use_nulls || !is_null_value(theState->buf, col)) &&
|
|
|
+ (!theState->docover || theState->use_nulls || !is_null_value(theState->cover, col)) &&
|
|
|
+ (make_rand() % nc < nt)) {
|
|
|
nt--;
|
|
|
if (is_null_value(theState->buf, col))
|
|
|
cpvalue(&theState->nulls, 0, &theState->buf, col);
|
|
@@ -190,14 +184,14 @@ int execute_random(struct rr_state *theState)
|
|
|
cat++;
|
|
|
}
|
|
|
G_percent((theState->nRand - nt), theState->nRand, 2);
|
|
|
+
|
|
|
+ nc--;
|
|
|
}
|
|
|
else {
|
|
|
set_to_null(&theState->buf, col);
|
|
|
if (theState->docover == 1)
|
|
|
set_to_null(&theState->cover, col);
|
|
|
}
|
|
|
-
|
|
|
- nc--;
|
|
|
}
|
|
|
|
|
|
while (col < ncols) {
|