# endif
if (rtp->StatFlag) {
- if (rtp->Deleting)
- rtp->ReInsertCount++;
- else
- rtp->InsertCount++;
+ rtp->InsertCount++;
}
- if (!rtp->Deleting)
- rtp->RectCount++;
+ rtp->RectCount++;
if (RTreeInsert2(rtp, r, data, *n, &newnode, level)) { /* root was split */
if (rtp->StatFlag) {
- if (rtp->Deleting)
- rtp->DeTouchCount++;
- else
- rtp->InTouchCount++;
+ rtp->InTouchCount++;
}
Node_t *newroot = RTreeNewNode(rtp); /* grow a new root, make tree taller */
assert(level >= 0 && level <= n->level);
if (rtp->StatFlag) {
- if (rtp->Deleting)
- rtp->DeTouchCount++;
- else
- rtp->InTouchCount++;
+ rtp->InTouchCount++;
}
/* Still above level for insertion, go down tree recursively */
long ElapsedTime;
float UserTime, SystemTime;
- int Deleting;
-
/* variables for statistics */
int StatFlag; /* tells if we are counting or not */
/* counters affected only when StatFlag set */
return 0;
} else {
if (rtp->StatFlag) {
- if (rtp->Deleting)
- rtp->DeTouchCount++;
- else
- rtp->InTouchCount++;
+ rtp->InTouchCount++;
}
assert(new);
SplitNode(rtp, n, b, new);
#endif
if (rtp->StatFlag) {
- if (rtp->Deleting)
- rtp->DeSplitCount++;
- else
- rtp->InSplitCount++;
+ rtp->InSplitCount++;
}
/* load all the branches into a buffer, initialize old node */
int area = RectArea(&p->cover[0]) + RectArea(&p->cover[1]);
/* record how good the split was for statistics */
- if (rtp->StatFlag && !rtp->Deleting && area)
+ if (rtp->StatFlag && area)
rtp->SplitMeritSum += (float) rtp->split.CoverSplitArea / area;
/* put branches from buffer into 2 nodes according to chosen partition */