10#include <vapor/QuadTreeRectangle.hpp>
27 QuadTreeRectangleP(
float left,
float top,
float right,
float bottom,
size_t max_depth = 12,
size_t reserve_size = 1000);
45 bool Insert(
float left,
float top,
float right,
float bottom,
DimsType payload);
53 bool Insert(std::vector<
class QuadTreeRectangle<float, pType>::rectangle_t> rectangles, std::vector<pType> payloads);
74 void GetStats(std::vector<size_t> &payload_histo, std::vector<size_t> &level_histo)
const;
78 for (
int i = 0; i < q._qtrs.size(); i++) {
79 os <<
"Bin " << i << std::endl;
80 os << q._qtrs[i] << std::endl;
88 std::vector<QuadTreeRectangle<float, pType> *> _qtrs;
std::array< uint32_t, 2 > UInt32_tArr2
Abstract base class for a 2D or 3D structured or unstructured grid.
This class wraps QuadTreeRectangleP with parallel tree construction.
QuadTreeRectangleP & operator=(const QuadTreeRectangleP &rhs)
bool Insert(const Grid *grid, size_t ncells=0)
bool Insert(std::vector< class QuadTreeRectangle< float, pType >::rectangle_t > rectangles, std::vector< pType > payloads)
QuadTreeRectangleP(size_t max_depth=12, size_t reserve_size=1000)
void GetPayloadContained(float x, float y, std::vector< DimsType > &payloads) const
QuadTreeRectangleP(const QuadTreeRectangleP &rhs)
QuadTreeRectangleP(float left, float top, float right, float bottom, size_t max_depth=12, size_t reserve_size=1000)
bool Insert(float left, float top, float right, float bottom, DimsType payload)
void GetStats(std::vector< size_t > &payload_histo, std::vector< size_t > &level_histo) const
friend std::ostream & operator<<(std::ostream &os, const QuadTreeRectangleP &q)
std::array< size_t, 3 > DimsType
Type for specifying integer indices.