2.4.1.4 Searching¶
-
ZixStatus zix_btree_find(const ZixBTree *t, const void *e, ZixBTreeIter *ti)¶
Set
tito an element exactly equal toeint.If no such item exists,
tiis set to the end.- Returns:
ZixStatus.ZIX_STATUS_SUCCESSon success, orZixStatus.ZIX_STATUS_NOT_FOUND.
-
ZixStatus zix_btree_lower_bound(const ZixBTree *t, ZixBTreeCompareFunc compare_key, const void *compare_key_data, const void *key, ZixBTreeIter *ti)¶
Set
tito the smallest element intthat is not less thane.The given comparator must be compatible with the tree comparator, that is, any two values must have the same ordering according to both. Within this constraint, it may implement fuzzier searching by handling special search key values, for example with wildcards.
If the search key
ecompares equal to many values in the tree, thentiwill be set to the least such element.The comparator is always called with an actual value in the tree as the first argument, and
keyas the second argument.- Returns: