95 assert(n->
level >= 0);
98 for (
size_t i = 0; i <
NODECARD; i++) {
113 assert(n->
level >= 0);
118 for (
size_t i = 0; i <
NODECARD; i++) {
134 assert(n->
level >= 0);
137 for (
size_t i = 0; i <
NODECARD; i++)
149 for (
size_t i = 0; i <
NODECARD; i++) {
177 for (
size_t i = 0; i <
NUMDIMS; i++)
183 newroot->
level = (*n)->level + 1;
206 Node_t **
new,
int level) {
211 assert(level >= 0 && level <= n->level);
214 if (n->
level > level) {
225 }
else if (n->
level == level) {
Memory allocation wrappers that exit on failure.
static void * gv_alloc(size_t size)
static Agnode_t * newnode(Agraph_t *g, IDTYPE id, uint64_t seq)
static int RTreeInsert2(RTree_t *, Rect_t, void *, Node_t *, Node_t **, int)
static LeafList_t * RTreeLeafListAdd(LeafList_t *llp, Leaf_t *lp)
void RTreeLeafListFree(LeafList_t *llp)
RTree_t * RTreeOpen(void)
static void RTreeClose2(RTree_t *rtp, Node_t *n)
Node_t * RTreeNewIndex(void)
void RTreeClose(RTree_t *rtp)
static LeafList_t * RTreeNewLeafList(Leaf_t *lp)
int RTreeInsert(RTree_t *rtp, Rect_t r, void *data, Node_t **n)
LeafList_t * RTreeSearch(RTree_t *rtp, Node_t *n, Rect_t r)
struct LeafList LeafList_t
Node_t * RTreeNewNode(void)
int AddBranch(RTree_t *rtp, Branch_t *b, Node_t *n, Node_t **new)
Rect_t NodeCover(Node_t *n)
void DisconBranch(Node_t *n, int i)
int PickBranch(Rect_t r, Node_t *n)
Rect_t CombineRect(const Rect_t r, const Rect_t rr)
bool Overlap(const Rect_t r, const Rect_t s)
struct Branch branch[NODECARD]
double boundary[NUMSIDES]