[ library(m_tree234) | Reference Manual | Alphabetic Index ]
lower_bound_lookup(+Tree, ++SearchKey, ?Key, ?Value)
Search a tree for the smallest key no smaller than SearchKey.
- A 2-3-4 tree
- A key to search for
- The key found
- The value corresponding to Key
This predicate searches the tree Tree for the entry with the
smallest key which is no smaller than SearchKey. If such a key is
found, then it attempts to unify it with Key and the corresponding
value with Value. If such a key is not found, then it aborts with
a runtime error.
This predicate should only be called with trees created by other
predicates from the tree234 module.
Fails if Key and Value do not unify with the key and value found.
lower_bound_search / 4, upper_bound_search / 4, upper_bound_lookup / 4