Did you know ... Search Documentation:
nb_rbtrees.pl -- Non-backtrackable operations on red black trees
PublicShow source

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.

author
- Jan Wielemaker
Source nb_rb_insert(!RBTree, +Key, +Value)
Add Key-Value to the tree RBTree using non-backtrackable destructive assignment.
Source 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.
Source nb_rb_node_value(+Node, -Value) is det
Value is the value associated to Node.
Source nb_rb_set_node_value(!Node, +Value) is det
Associate Value with Node.