nb_rbtrees.pl -- Non-backtrackable operations on red black trees
This library is an extension to rbtrees.pl, implementing Red-black trees. This library adds non-backtrackable destructive update to RB trees which allows us to fill RB trees in a failure driven loop.
This module builds on top of the rbtrees.pl and used code copied from library written by Vitor Santos Costa.
- nb_rb_insert(!RBTree, +Key, +Value)
- Add Key-Value to the tree RBTree using non-backtrackable destructive assignment.
- nb_rb_get_node(+RBTree, +Key, -Node) is semidet
- True if Node is the node in RBTree associated to Key. Fails if Key is not in RBTree. This predicate is intended to be used together with nb_rb_set_node_value/2 to update the associated key destructively.
- nb_rb_node_value(+Node, -Value) is det
- Value is the value associated to Node.
- nb_rb_set_node_value(!Node, +Value) is det
- Associate Value with Node.