Be more explicit on the significance of the start pointers for 1:nbin.

This commit is contained in:
Bård Skaflestad 2010-08-18 19:16:14 +00:00
parent 02678a7fbe
commit 8845c8d8f8

View File

@ -191,7 +191,7 @@ partition_invert(int nc, const int *p, int *pi, int *inverse)
/* Count elements per bin */ /* Count elements per bin */
for (i = 0; i < nc ; i++) { pi[ p[i] ]++; } for (i = 0; i < nc ; i++) { pi[ p[i] ]++; }
/* Derive start pointers for b=1:nbin */ /* Derive start pointers for b=1:nbin (== ubound for b=0:nbin-1) */
for (b = 1; b < nbin; b++) { pi[b] += pi[b - 1]; } for (b = 1; b < nbin; b++) { pi[b] += pi[b - 1]; }
/* Set end pointer in last bin */ /* Set end pointer in last bin */