![]() |
YAP 7.1.0
|
Engine Independent trie library. More...
Engine Independent trie library.
The next routines provide a set of utilities to create and manipulate prefix trees of Prolog terms Tries were originally proposed to implement tabling in Logic Programming, but can be used for other purposes The tries will be stored in the Prolog database and can seen as alternative to assert
and record
family of primitives Most of these utilities have been implemented in C
for efficiency They are available through the use_module(library(tries))
command
struct db_trie_opt_level |
class trie_put_entry/4 |
trie_put_entry(+Mode,+ Trie,+ Term,- Ref)
Add term Term to trie Trie The handle Ref gives a reference to the term
class trie_get_entry/2 |
trie_get_entry(+ Ref,- Term)
Unify Term with the entry for handle Ref
class trie_close/1 |
trie_close(+ Id)
Close trie with identifier Id
class trie_close_all/0 |
trie_close_all
Close all available tries
class trie_mode/1 |
trie_mode(? Mode)
Unify Mode with trie operation mode Allowed values are either std
(default) or rev
class trie_check_entry/3 |
trie_check_entry(+ Trie,+ Term,- Ref)
Succeeds if a variant of term Term is in trie Trie An handle Ref gives a reference to the term
class trie_remove_entry/1 |
trie_remove_entry(+ Ref)
Remove entry for handle Ref
class trie_remove_subtree/1 |
trie_remove_subtree(+ Ref)
Remove subtree rooted at handle Ref
class trie_save/2 |
trie_save(+ Trie,+ FileName)
Dump trie Trie into file FileName
class trie_load/2 |
trie_load(- Trie,+ FileName)
Load trie Trie from the contents of file FileName
class trie_stats/4 |
trie_stats(- Memory,- Tries,- Entries,- Nodes)
Give generic statistics on tries, including the amount of memory, Memory, the number of tries, Tries, the number of entries, Entries, and the total number of nodes, Nodes
class trie_max_stats/4 |
trie_max_stats(- Memory,- Tries,- Entries,- Nodes)
Give maximal statistics on tries, including the amount of memory, Memory, the number of tries, Tries, the number of entries, Entries, and the total number of nodes, Nodes
class trie_usage/4 |
trie_usage(+ Trie,- Entries,- Nodes,- VirtualNodes)
Give statistics on trie Trie, the number of entries, Entries, and the total number of nodes, Nodes, and the number of VirtualNodes
class trie_print/1 |
trie_print(+ Trie)
Print trie Trie on standard output
db_trie_opt_level* opt_level |
Macros | |
#define | arg_mode YAP_ARG1 |
#define | arg_mode YAP_ARG1 |
#define | arg_mode YAP_ARG1 |
#define | arg_mode YAP_ARG1 |
#define | arg_trie YAP_ARG2 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_trie YAP_ARG1 |
#define | arg_entry YAP_ARG3 |
#define | arg_entry YAP_ARG3 |
#define | arg_entry YAP_ARG2 |
#define | arg_entry YAP_ARG2 |
#define | arg_entry YAP_ARG2 |
#define | arg_entry YAP_ARG1 |
#define | arg_ref YAP_ARG4 |
#define | arg_ref YAP_ARG2 |
#define | arg_ref YAP_ARG3 |
#define | arg_ref YAP_ARG3 |
#define | arg_ref YAP_ARG1 |
#define | arg_ref YAP_ARG2 |
#define | arg_ref YAP_ARG2 |
#define | arg_ref YAP_ARG3 |
#define | arg_ref YAP_ARG3 |
#define | arg_ref YAP_ARG1 |
#define | arg_ref YAP_ARG1 |
#define | arg_ref YAP_ARG2 |
#define | arg_init_ref YAP_ARG2 |
#define | arg_init_ref YAP_ARG2 |
#define | arg_trie_dest YAP_ARG1 |
#define | arg_trie_dest YAP_ARG1 |
#define | arg_trie_source YAP_ARG2 |
#define | arg_trie_source YAP_ARG2 |
#define | arg_trie1 YAP_ARG1 |
#define | arg_trie1 YAP_ARG1 |
#define | arg_trie2 YAP_ARG2 |
#define | arg_trie2 YAP_ARG2 |
#define | arg_entries YAP_ARG3 |
#define | arg_entries YAP_ARG3 |
#define | arg_entries YAP_ARG3 |
#define | arg_entries YAP_ARG3 |
#define | arg_entries YAP_ARG2 |
#define | arg_file YAP_ARG2 |
#define | arg_file YAP_ARG2 |
#define | arg_memory YAP_ARG1 |
#define | arg_memory YAP_ARG1 |
#define | arg_tries YAP_ARG2 |
#define | arg_tries YAP_ARG2 |
#define | arg_nodes YAP_ARG4 |
#define | arg_nodes YAP_ARG4 |
#define | arg_nodes YAP_ARG3 |
#define | arg_virtualnodes YAP_ARG4 |
#define | arg_cur YAP_ARG1 |
#define | arg_next YAP_ARG2 |
#define | arg_list YAP_ARG2 |
#define | arg_db_trie YAP_ARG2 |
#define | arg_final_label YAP_ARG3 |
#define | arg_opt_level YAP_ARG4 |
#define | arg_opt_level YAP_ARG1 |
#define | arg_opt_level YAP_ARG1 |
#define | arg_start_counter YAP_ARG5 |
#define | arg_end_counter YAP_ARG6 |
#define | arg_count YAP_ARG2 |
#define | arg_count YAP_ARG2 |
#define | arg_nested_id YAP_ARG2 |
#define | arg_term YAP_ARG3 |
#define | arg_min_prefix YAP_ARG1 |
Functions | |
O_API void | init_tries (void) |
Variables | |
db_trie_opt_level * | opt_level |