93 assert(n->
level >= 0);
96 for (
size_t i = 0; i <
NODECARD; i++) {
111 assert(n->
level >= 0);
116 for (
size_t i = 0; i <
NODECARD; i++) {
132 assert(n->
level >= 0);
135 for (
size_t i = 0; i <
NODECARD; i++)
147 for (
size_t i = 0; i <
NODECARD; i++) {
175 for (
size_t i = 0; i <
NUMDIMS; i++)
181 newroot->
level = (*n)->level + 1;
204 Node_t **
new,
int level) {
209 assert(level >= 0 && level <= n->level);
212 if (n->
level > level) {
223 }
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]