24 #include <sys/types.h> 47 #define NODECARD MAXCARD 48 #define LEAFCARD MAXCARD 55 #define NODE_BUFFER_SIZE 32 202 double x_max,
double y_min,
double y_max);
204 double x_max,
double y_min,
double y_max,
double z_min,
207 double x_max,
double y_min,
double y_max,
double z_min,
208 double z_max,
double t_min,
double t_max);
int SearchHitCallback(int id, const struct RTree_Rect *rect, void *arg)
size_t RTreeWriteNode(struct RTree_Node *, struct RTree *)
struct RTree_Node * RTreeAllocNode(struct RTree *, int)
int RTreeContained(struct RTree_Rect *, struct RTree_Rect *, struct RTree *)
rt_search_fn * search_rect
int rt_valid_child_fn(union RTree_Child *)
rt_delete_fn * delete_rect
void RTreeFreeBoundary(struct RTree_Rect *r)
Delete the boundary of a rectangle.
void RTreeFreeRect(struct RTree_Rect *r)
Delete a rectangle.
void RTreeDestroyNode(struct RTree_Node *, int)
void RTreeFlushBuffer(struct RTree *)
void RTreeSetRect3D(struct RTree_Rect *r, struct RTree *t, double x_min, double x_max, double y_min, double y_max, double z_min, double z_max)
Set three dimensional coordinates of a rectangle for a given tree.
void RTreeCopyNode(struct RTree_Node *, struct RTree_Node *, struct RTree *)
void RTreeFreeNode(struct RTree_Node *)
void RTreeSetRect2D(struct RTree_Rect *r, struct RTree *t, double x_min, double x_max, double y_min, double y_max)
Set two dimensional coordinates of a rectangle for a given tree.
int rt_insert_fn(struct RTree_Rect *, union RTree_Child, int, struct RTree *)
rt_valid_child_fn * valid_child
struct RTree * RTreeCreateTree(int, off_t, int)
Create new empty R*-Tree.
struct RTree_Rect * RTreeAllocRect(struct RTree *t)
Create a new rectangle for a given tree.
int rt_search_fn(struct RTree *, struct RTree_Rect *, SearchHitCallback *, void *)
unsigned char ndims_alloc
void partition(T *data, size_t n, size_t &pivot, CMPR &cmp)
void RTreePrintRect(struct RTree_Rect *, int, struct RTree *)
void RTreeInitNode(struct RTree *, struct RTree_Node *, int)
int RTreeContains(struct RTree_Rect *, struct RTree_Rect *, struct RTree *)
struct RTree_Branch * BranchBuf
void RTreeSetRect4D(struct RTree_Rect *r, struct RTree *t, double x_min, double x_max, double y_min, double y_max, double z_min, double z_max, double t_min, double t_max)
Set 4 dimensional coordinates of a rectangle for a given tree.
struct RTree_Branch * branch
unsigned char nsides_alloc
int rt_delete_fn(struct RTree_Rect *, union RTree_Child, struct RTree *)
void RTreeSetOverflow(struct RTree *, char)
Enable/disable R*-tree forced reinsertion (overflow)
int RTreeDeleteRect(struct RTree_Rect *, int, struct RTree *)
Delete an item from a R*-Tree.
int RTreeInsertRect(struct RTree_Rect *, int, struct RTree *)
Insert an item into a R*-Tree.
rt_insert_fn * insert_rect
void RTreeDestroyTree(struct RTree *)
Destroy an R*-Tree.
size_t RTreeReadNode(struct RTree_Node *, off_t, struct RTree *)
off_t RTreeGetNodePos(struct RTree *)
int RTreeSearch(struct RTree *, struct RTree_Rect *, SearchHitCallback *, void *)
Search an R*-Tree.
RectReal * RTreeAllocBoundary(struct RTree *t)
Allocate the boundary array of a rectangle for a given tree.
int RTreeOverlap(struct RTree_Rect *, struct RTree_Rect *, struct RTree *)
void RTreeSetRect1D(struct RTree_Rect *r, struct RTree *t, double x_min, double x_max)
Set one dimensional coordinates of a rectangle for a given tree.