Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 566 Bytes

README.md

File metadata and controls

5 lines (3 loc) · 566 Bytes

r-tree

Here is an example implementation of an R-tree in C++: src.cpp

This implementation creates an RTree object with a specified maximum number of children per node, and allows for the insertion of Rect objects into the tree. It also provides a search function that returns all Rect objects that overlap with a given query rectangle. The implementation uses a recursive algorithm to build and search the R-tree, and includes helper functions for calculating the area of a rectangle, the distance between two rectangles, and the intersection of two rectangles.