12struct SearchResultItem;
36 static constexpr std::size_t
kSize = 40;
53 void encode(std::uint8_t* out)
const;
83 std::uint64_t num_items, std::uint16_t
node_size,
Synchronous byte-range source.
Minimal C++17 stand-in for std::span: a non-owning view over contiguous memory.
std::uint64_t rtree_num_nodes(std::uint64_t num_items, std::uint16_t node_size)
Total node count in the tree, per the Rust level-bounds loop (packed_rtree/mod.rs:342-375).
std::vector< SearchResultItem > rtree_search_bbox(RangeReader &reader, std::uint64_t index_begin, std::uint64_t num_items, std::uint16_t node_size, const BBox &query)
Breadth-first bbox search over the packed R-tree, reading nodes through the supplied reader.
std::vector< LevelBound > rtree_level_bounds(std::uint64_t num_items, std::uint16_t node_size)
Mirrors generate_level_bounds (packed_rtree/mod.rs:342-375).
std::uint64_t index_begin
Half-open [start, end) node index range for one tree level, in the flat node array shared by every le...
One R-tree node entry: 4 doubles then a u64, all little-endian, 40 bytes with no padding (packed_rtre...
static NodeItem decode(bytes_view b)
static NodeItem empty(std::uint64_t offset)
The "empty" node used as the fold/aggregation identity: any real bbox's expand widens it.
void expand(const NodeItem &r)
Widens this node's bbox to also cover r, leaving offset untouched.
static constexpr std::size_t kSize
bool intersects(const BBox &q) const
Mirrors NodeItem::intersects (packed_rtree/mod.rs:122-134), which uses strict < and >: touching edges...
void encode(std::uint8_t *out) const
Writes this node's 40 bytes (4 LE f64 then a LE u64), matching decode's layout exactly.