add asserts

This commit is contained in:
Mike McCandless 2016-03-17 10:10:28 -04:00
parent b648ce5afa
commit 319518c28e
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); System.arraycopy(reader.packedValue(), splitDim*bytesPerDim, scratch1, 0, bytesPerDim);
if (numDims > 1) { if (numDims > 1) {
assert ordBitSet.get(reader.ord()) == false;
ordBitSet.set(reader.ord()); ordBitSet.set(reader.ord());
// Start at 1 because we already did the first value above (so we could keep the split value): // 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++) { for(int i=1;i<rightCount;i++) {
result = reader.next(); result = reader.next();
assert result; assert result;
assert ordBitSet.get(reader.ord()) == false;
ordBitSet.set(reader.ord()); ordBitSet.set(reader.ord());
} }
} }