(self, depth, key)
Put a key into the B+-tree at a given number of levels.
Put a key into the B+-tree at a given number of levels.
Put a key into the B + - tree at a given number of levels .
def key(self, depth, key):
        "Put a key into the B+-tree at a given number of levels."
        width = height = 20
        padding = 3
        margin = 16
        prev = None
        yoff = 4
        for i in range(self._depth - depth, self._depth):
            y = self.y_top + i * (height + margin)
            box((self.x[i], y),
                (self.x[i] + width, y + height),
                {'stroke': 'white', 'fill': '#ccc'})
            cx, cy = self.x[i] + width/2, y + height/2
            if prev is not None:
                arrow(prev, (cx, y))

            label(cx, y + height - padding - yoff, key)

            prev = cx, y + height - yoff
            self.x[i] += width
def key ( self , depth , key ) : width = height = 20 padding = 3 margin = 16 prev = None yoff = 4 for i in range ( self . _depth - depth , self . _depth ) : y = self . y_top + i * ( height + margin ) box ( ( self . x [ i ] , y ) , ( self . x [ i ] + width , y + height ) , { 'stroke' : 'white' , 'fill' : '#ccc' } ) cx , cy = self . x [ i ] + width / 2 , y + height / 2 if prev is not None : arrow ( prev , ( cx , y ) ) label ( cx , y + height - padding - yoff , key ) prev = cx , y + height - yoff self . x [ i ] += width