Re: [ZODB-Dev] Nearest Neighbors with OOBTree

2006-07-27 Thread Tim Peters
[Chris S] Is there a way to determine the nearest neighbors to a key in an OOBTree? Something like: >>> from BTrees.OOBTree import OOBTree >>> tree = OOBTree(dict(a=1, b=2, c=3, d=4)) >>> tree.nearestLowItem('b') ('a',1) >>> tree.nearestHighItem('b') ('c',3) Efficient range searches are an imp

[ZODB-Dev] Nearest Neighbors with OOBTree

2006-07-27 Thread Chris S
Is there a way to determine the nearest neighbors to a key in an OOBTree? Something like: from BTrees.OOBTree import OOBTree tree = OOBTree(dict(a=1, b=2, c=3, d=4)) tree.nearestLowItem('b') ('a',1) tree.nearestHighItem('b') ('c',3) ___ For more inf