Correct another off-by-one in the CSR start pointer implementation.

This commit is contained in:
Bård Skaflestad 2010-10-04 17:43:45 +00:00
parent 14f682a0b4
commit 4357d2564c

View File

@ -232,7 +232,7 @@ partition_invert(int nc, const int *p, int *pi, int *inverse)
/* Count elements per bin */
for (i = 0; i < nc; i++) { pi[ p[i] + 1 ]++; }
for (b = 1; b < nbin; b++) {
for (b = 1; b <= nbin; b++) {
pi[0] += pi[b];
pi[b] = pi[0] - pi[b];
}