libdict
Data Structure C Library
Loading...
Searching...
No Matches
wb_tree.h File Reference
#include "dict.h"
Include dependency graph for wb_tree.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct wb_tree wb_tree
 
typedef struct wb_itor wb_itor
 

Functions

wb_treewb_tree_new (dict_compare_func cmp_func)
 
dictwb_dict_new (dict_compare_func cmp_func)
 
size_t wb_tree_free (wb_tree *tree, dict_delete_func delete_func)
 
dict_insert_result wb_tree_insert (wb_tree *tree, void *key)
 
void ** wb_tree_search (wb_tree *tree, const void *key)
 
void ** wb_tree_search_le (wb_tree *tree, const void *key)
 
void ** wb_tree_search_lt (wb_tree *tree, const void *key)
 
void ** wb_tree_search_ge (wb_tree *tree, const void *key)
 
void ** wb_tree_search_gt (wb_tree *tree, const void *key)
 
dict_remove_result wb_tree_remove (wb_tree *tree, const void *key)
 
size_t wb_tree_clear (wb_tree *tree, dict_delete_func delete_func)
 
size_t wb_tree_traverse (wb_tree *tree, dict_visit_func visit, void *user_data)
 
bool wb_tree_select (wb_tree *tree, size_t n, const void **key, void **datum)
 
size_t wb_tree_count (const wb_tree *tree)
 
size_t wb_tree_min_path_length (const wb_tree *tree)
 
size_t wb_tree_max_path_length (const wb_tree *tree)
 
size_t wb_tree_total_path_length (const wb_tree *tree)
 
bool wb_tree_verify (const wb_tree *tree)
 
wb_itorwb_itor_new (wb_tree *tree)
 
dict_itorwb_dict_itor_new (wb_tree *tree)
 
void wb_itor_free (wb_itor *tree)
 
bool wb_itor_valid (const wb_itor *itor)
 
void wb_itor_invalidate (wb_itor *itor)
 
bool wb_itor_next (wb_itor *itor)
 
bool wb_itor_prev (wb_itor *itor)
 
bool wb_itor_nextn (wb_itor *itor, size_t count)
 
bool wb_itor_prevn (wb_itor *itor, size_t count)
 
bool wb_itor_first (wb_itor *itor)
 
bool wb_itor_last (wb_itor *itor)
 
bool wb_itor_search (wb_itor *itor, const void *key)
 
bool wb_itor_search_le (wb_itor *itor, const void *key)
 
bool wb_itor_search_lt (wb_itor *itor, const void *key)
 
bool wb_itor_search_ge (wb_itor *itor, const void *key)
 
bool wb_itor_search_gt (wb_itor *itor, const void *key)
 
const void * wb_itor_key (const wb_itor *itor)
 
void ** wb_itor_datum (wb_itor *itor)
 
int wb_itor_compare (const wb_itor *i1, const wb_itor *i2)
 
bool wb_itor_remove (wb_itor *itor)
 

Typedef Documentation

◆ wb_itor

typedef struct wb_itor wb_itor

Definition at line 60 of file wb_tree.h.

◆ wb_tree

typedef struct wb_tree wb_tree

Definition at line 35 of file wb_tree.h.

Function Documentation

◆ wb_dict_itor_new()

dict_itor * wb_dict_itor_new ( wb_tree * tree)

Definition at line 436 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_dict_new()

dict * wb_dict_new ( dict_compare_func cmp_func)

Definition at line 139 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_compare()

int wb_itor_compare ( const wb_itor * i1,
const wb_itor * i2 )

Definition at line 465 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_datum()

void ** wb_itor_datum ( wb_itor * itor)

Definition at line 464 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_first()

bool wb_itor_first ( wb_itor * itor)

Definition at line 456 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_free()

void wb_itor_free ( wb_itor * tree)

Definition at line 449 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_invalidate()

void wb_itor_invalidate ( wb_itor * itor)

Definition at line 451 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_key()

const void * wb_itor_key ( const wb_itor * itor)

Definition at line 463 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_last()

bool wb_itor_last ( wb_itor * itor)

Definition at line 457 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_new()

wb_itor * wb_itor_new ( wb_tree * tree)

Definition at line 425 of file wb_tree.c.

◆ wb_itor_next()

bool wb_itor_next ( wb_itor * itor)

Definition at line 452 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_nextn()

bool wb_itor_nextn ( wb_itor * itor,
size_t count )

Definition at line 454 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_prev()

bool wb_itor_prev ( wb_itor * itor)

Definition at line 453 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_prevn()

bool wb_itor_prevn ( wb_itor * itor,
size_t count )

Definition at line 455 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_remove()

bool wb_itor_remove ( wb_itor * itor)

Definition at line 468 of file wb_tree.c.

◆ wb_itor_search()

bool wb_itor_search ( wb_itor * itor,
const void * key )

Definition at line 458 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_search_ge()

bool wb_itor_search_ge ( wb_itor * itor,
const void * key )

Definition at line 461 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_search_gt()

bool wb_itor_search_gt ( wb_itor * itor,
const void * key )

Definition at line 462 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_search_le()

bool wb_itor_search_le ( wb_itor * itor,
const void * key )

Definition at line 459 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_search_lt()

bool wb_itor_search_lt ( wb_itor * itor,
const void * key )

Definition at line 460 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_itor_valid()

bool wb_itor_valid ( const wb_itor * itor)

Definition at line 450 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_tree_clear()

size_t wb_tree_clear ( wb_tree * tree,
dict_delete_func delete_func )

Definition at line 324 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_tree_count()

size_t wb_tree_count ( const wb_tree * tree)

Definition at line 356 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_tree_free()

size_t wb_tree_free ( wb_tree * tree,
dict_delete_func delete_func )

Definition at line 323 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_tree_insert()

dict_insert_result wb_tree_insert ( wb_tree * tree,
void * key )

Definition at line 235 of file wb_tree.c.

◆ wb_tree_max_path_length()

size_t wb_tree_max_path_length ( const wb_tree * tree)

Definition at line 358 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_tree_min_path_length()

size_t wb_tree_min_path_length ( const wb_tree * tree)

Definition at line 357 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_tree_new()

wb_tree * wb_tree_new ( dict_compare_func cmp_func)

Definition at line 124 of file wb_tree.c.

◆ wb_tree_remove()

dict_remove_result wb_tree_remove ( wb_tree * tree,
const void * key )

Definition at line 313 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_tree_search()

void ** wb_tree_search ( wb_tree * tree,
const void * key )

Definition at line 152 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_tree_search_ge()

void ** wb_tree_search_ge ( wb_tree * tree,
const void * key )

Definition at line 155 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_tree_search_gt()

void ** wb_tree_search_gt ( wb_tree * tree,
const void * key )

Definition at line 156 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_tree_search_le()

void ** wb_tree_search_le ( wb_tree * tree,
const void * key )

Definition at line 153 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_tree_search_lt()

void ** wb_tree_search_lt ( wb_tree * tree,
const void * key )

Definition at line 154 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_tree_select()

bool wb_tree_select ( wb_tree * tree,
size_t n,
const void ** key,
void ** datum )

Definition at line 328 of file wb_tree.c.

◆ wb_tree_total_path_length()

size_t wb_tree_total_path_length ( const wb_tree * tree)

Definition at line 359 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_tree_traverse()

size_t wb_tree_traverse ( wb_tree * tree,
dict_visit_func visit,
void * user_data )

Definition at line 325 of file wb_tree.c.

Here is the call graph for this function:

◆ wb_tree_verify()

bool wb_tree_verify ( const wb_tree * tree)

Definition at line 412 of file wb_tree.c.