The BST key type.
Definition: bst.h:85
int uproc_bst_remove(uproc_bst *t, union uproc_bst_key key, void *value)
Remove item.
uproc_bst_keytype
Which member of union uproc_bst_key is used.
Definition: bst.h:95
int uproc_bst_insert(uproc_bst *t, union uproc_bst_key key, const void *value)
Insert item.
BST already contains an item with the given key.
Definition: bst.h:110
.word (struct uproc_word)
Definition: bst.h:100
void uproc_bst_destroy(uproc_bst *t)
Destroy BST and all contained nodes.
uintmax_t uint
Unsigned integer.
Definition: bst.h:88
void uproc_bst_map(const uproc_bst *t, void(*func)(union uproc_bst_key, void *, void *), void *opaque)
Apply function to all items.
struct uproc_word word
Amino acid word.
Definition: bst.h:91
uproc_bstiter * uproc_bstiter_create(const uproc_bst *t)
Create BST in-order iterator.
uproc_bst * uproc_bst_create(enum uproc_bst_keytype key_type, size_t value_size)
Initialize an empty binary search tree.
Module: Amino acid words.
int uproc_bst_update(uproc_bst *t, union uproc_bst_key key, const void *value)
Insert or update item.
size_t uproc_bst_size(const uproc_bst *t)
Return the number of nodes.
int uproc_bstiter_next(uproc_bstiter *iter, union uproc_bst_key *key, void *value)
Obtain next key/value pair.
BST doesn't contain an item with the given key.
Definition: bst.h:107
Module: Common definitions.
void uproc_bstiter_destroy(uproc_bstiter *iter)
Destroy BST iterator.
int uproc_bst_get(uproc_bst *t, union uproc_bst_key key, void *value)
Get item.
Amino acid word.
Definition: word.h:45
.uint (uintmax_t)
Definition: bst.h:97
int uproc_bst_isempty(uproc_bst *t)
Return non-zero if the tree is empty.