#include "PastryLeafSet.h"
#include "PastryTypes.h"
#include "NodeVector.h"
Defines | |
#define | LEAF_TEST() |
Functions | |
Define_Module (PastryLeafSet) |
#define LEAF_TEST | ( | ) |
Value:
do {\ uint count = 0;\ uint i = 0, j = leaves.size() - 1;\ while (leaves[i].isUnspecified() && i < j) ++i;\ while (leaves[j].isUnspecified() && i < j) --j;\ if (i == j) break;\ if (!owner.key.isBetween(leaves[(leaves.size() / 2) - 1].key,\ leaves[leaves.size() / 2].key))\ breakpoint("leafset broken!");\ for (uint ci = i + 1; ci < j; ++ci) {\ if (leaves[ci - 1].key >= leaves[ci].key) {\ count++;\ }\ }\ if (leaves[j].key >= leaves[i].key) count++;\ if (count > 1) breakpoint("leafset broken!");\ } while (false);
Referenced by PastryLeafSet::failedNode(), and PastryLeafSet::insertLeaf().
Define_Module | ( | PastryLeafSet | ) |