Non-Backtrackable Data Structures¶
The following routines implement well-known data-structures using global non-backtrackable variables (implemented on the Prolog stack).
The data-structures currently supported are Queues, Heaps, and Beam for Beam search. They are allowed through library(nb)
.
- nb_queue_size/2
- nb_queue_peek/3
- nb_queue_enqueue/3
- nb_queue_empty/1
- nb_queue_dequeue/3
- nb_queue_close/3
- nb_queue/1
- nb_heap_size/3
- nb_heap_peek/4
- nb_heap_empty/1
- nb_heap_del/4
- nb_heap_close/1
- nb_heap_add/4
- nb_heap/2
- nb_beam_size/3
- nb_beam_peek/4
- nb_beam_empty/1
- nb_beam_del/4
- nb_beam_close/1
- nb_beam_add/4
- nb_beam/2