diff --git a/rstar/CHANGELOG.md b/rstar/CHANGELOG.md index 68832b1..2f6d912 100644 --- a/rstar/CHANGELOG.md +++ b/rstar/CHANGELOG.md @@ -8,6 +8,7 @@ ## Fixed - Fix excessive memory retention in `bulk_load` from `Vec::split_off` over-capacity +- Fix transcription error in implementation of OMT bulk loading leading to nodes which are too large. ## Changed - Made `RStar` methods take `Point` and `Envelope` as owned values where it makes sense ([PR](https://github.com/georust/rstar/pull/189)) diff --git a/rstar/src/algorithm/bulk_load/cluster_group_iterator.rs b/rstar/src/algorithm/bulk_load/cluster_group_iterator.rs index da64549..f573ea2 100644 --- a/rstar/src/algorithm/bulk_load/cluster_group_iterator.rs +++ b/rstar/src/algorithm/bulk_load/cluster_group_iterator.rs @@ -75,7 +75,7 @@ where let max_dimension = ::Point::DIMENSIONS as f32; // Try to split all clusters among all dimensions as evenly as possible by taking the nth root. - number_of_clusters.powf(1. / max_dimension).ceil() as usize + number_of_clusters.powf(1. / max_dimension).floor() as usize } fn div_up(dividend: usize, divisor: usize) -> usize {