add asserts

This commit is contained in:
Mike McCandless 2016-03-17 10:10:28 -04:00
parent 6ebf61535e
commit 85945ef2a7
1 changed files with 2 additions and 0 deletions

View File

@ -977,12 +977,14 @@ public class BKDWriter implements Closeable {
System.arraycopy(reader.packedValue(), splitDim*bytesPerDim, scratch1, 0, bytesPerDim);
if (numDims > 1) {
assert ordBitSet.get(reader.ord()) == false;
ordBitSet.set(reader.ord());
// Start at 1 because we already did the first value above (so we could keep the split value):
for(int i=1;i<rightCount;i++) {
result = reader.next();
assert result;
assert ordBitSet.get(reader.ord()) == false;
ordBitSet.set(reader.ord());
}
}