Hi all I understand that if rtree is created with range values in boost it would use packing algorithm. I need an example of rtree using packing algorithm. Here is my code that uses quadratic algorithm
using point = bg::model::point < int, 2, bg::cs::cartesian >;
using pointI = std::pair<point, std::size_t>;
vector<point> contourCenters // has some value
bgi::rtree< pointI, bgi::quadratic<16> > rtree;
vector< pointI > cloud;
for (size_t i = 0; i < contourCenters.size(); ++i)
{
int x = contourCenters[i].get < 0 >();
int y = contourCenters[i].get < 1 >();
cout << "Contour Centers: (" << x << "," << y << ")";
cloud.push_back(mp(x, y, i));
rtree.insert(make_pair(contourCenters[i], i));
}
I would like to create rtree with packing algorithm as it seems to be the fastest one in boost. Kindly guide me how to create a rtree with packing algorithm in boost.