PastryLeafSet.cc File Reference


Detailed Description

Author:
Felix Palmen

#include "PastryLeafSet.h"
#include "PastryTypes.h"
#include "NodeVector.h"

Defines

#define LEAF_TEST()

Functions

 Define_Module (PastryLeafSet)


Define Documentation

 
#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().


Function Documentation

Define_Module ( PastryLeafSet   ) 


Generated on Fri Sep 19 13:05:05 2008 for ITM OverSim by  doxygen 1.5.5