Skip to content

RTree::bulk_load does not comply with MAX_SIZE in higher dimensions #197

@AlphaNow37

Description

@AlphaNow37

This code, using points with a lot of dimensions

let pts = (0..100_000).map(|i| [i as f32; 100]).collect::<Vec<_>>();
let tree = RTree::bulk_load(pts);
dbg!(tree.root().children().len());

prints 100_000 which is far above MAX_SIZE=6

in fact, even with 3 dimensions, there can be 2^3 = 8 children in some internal nodes:

let pts = (0..1000).map(|i| [i as f32; 3]).collect::<Vec<_>>();
let tree = RTree::bulk_load(pts);
dbg!(tree.root().children().len());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions