Skip to content

Commit

Permalink
point rtree size
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Jul 14, 2023
1 parent 7482578 commit 98e98ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/geo/point_rtree.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ struct point_rtree {

std::vector<size_t> within(geo::box const&) const;

std::size_t size() const;

private:
struct impl;
std::unique_ptr<impl> impl_;
Expand Down
4 changes: 4 additions & 0 deletions src/point_rtree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ struct point_rtree::impl {
return results;
}

std::size_t size() const { return rtree_.size(); }

rtree_t rtree_;
};

Expand Down Expand Up @@ -119,4 +121,6 @@ std::vector<std::pair<double, size_t>> point_rtree::nearest(
return impl_->nearest(center, k);
}

std::size_t point_rtree::size() const { return impl_->size(); }

} // namespace geo

0 comments on commit 98e98ac

Please sign in to comment.