Don't forget to initialize cells[0]
This commit is contained in:
@@ -55,9 +55,11 @@ where
|
||||
// result as this is the max number of elements per bucket.
|
||||
let max_offset = (distinct.len() / (1 << cell_bits)) + 1;
|
||||
|
||||
// Do not forget to initialise cells[0]
|
||||
let mut cells: Vec<Cell<V>> = Vec::with_capacity(1 << cell_bits);
|
||||
|
||||
// Do not forget to initialise cells[0]!
|
||||
cells.push(Vec::with_capacity(max_offset));
|
||||
|
||||
for coordinate in distinct {
|
||||
//trace!("{:?} {:?} {:?} {:?}", dimension, coordinate, cell, count);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user