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

Go to the source code of this file.

Typedefs

typedef struct pr_tree pr_tree
 
typedef struct pr_itor pr_itor
 

Functions

pr_treepr_tree_new (dict_compare_func cmp_func)
 
dictpr_dict_new (dict_compare_func cmp_func)
 
size_t pr_tree_free (pr_tree *tree, dict_delete_func delete_func)
 
dict_insert_result pr_tree_insert (pr_tree *tree, void *key)
 
void ** pr_tree_search (pr_tree *tree, const void *key)
 
void ** pr_tree_search_le (pr_tree *tree, const void *key)
 
void ** pr_tree_search_lt (pr_tree *tree, const void *key)
 
void ** pr_tree_search_ge (pr_tree *tree, const void *key)
 
void ** pr_tree_search_gt (pr_tree *tree, const void *key)
 
dict_remove_result pr_tree_remove (pr_tree *tree, const void *key)
 
size_t pr_tree_clear (pr_tree *tree, dict_delete_func delete_func)
 
size_t pr_tree_traverse (pr_tree *tree, dict_visit_func visit, void *user_data)
 
bool pr_tree_select (pr_tree *tree, size_t n, const void **key, void **datum)
 
size_t pr_tree_count (const pr_tree *tree)
 
size_t pr_tree_min_path_length (const pr_tree *tree)
 
size_t pr_tree_max_path_length (const pr_tree *tree)
 
size_t pr_tree_total_path_length (const pr_tree *tree)
 
bool pr_tree_verify (const pr_tree *tree)
 
pr_itorpr_itor_new (pr_tree *tree)
 
dict_itorpr_dict_itor_new (pr_tree *tree)
 
void pr_itor_free (pr_itor *tree)
 
bool pr_itor_valid (const pr_itor *itor)
 
void pr_itor_invalidate (pr_itor *itor)
 
bool pr_itor_next (pr_itor *itor)
 
bool pr_itor_prev (pr_itor *itor)
 
bool pr_itor_nextn (pr_itor *itor, size_t count)
 
bool pr_itor_prevn (pr_itor *itor, size_t count)
 
bool pr_itor_first (pr_itor *itor)
 
bool pr_itor_last (pr_itor *itor)
 
bool pr_itor_search (pr_itor *itor, const void *key)
 
bool pr_itor_search_le (pr_itor *itor, const void *key)
 
bool pr_itor_search_lt (pr_itor *itor, const void *key)
 
bool pr_itor_search_ge (pr_itor *itor, const void *key)
 
bool pr_itor_search_gt (pr_itor *itor, const void *key)
 
const void * pr_itor_key (const pr_itor *itor)
 
void ** pr_itor_datum (pr_itor *itor)
 
int pr_itor_compare (const pr_itor *i1, const pr_itor *i2)
 
bool pr_itor_remove (pr_itor *itor)
 

Typedef Documentation

◆ pr_itor

typedef struct pr_itor pr_itor

Definition at line 59 of file pr_tree.h.

◆ pr_tree

typedef struct pr_tree pr_tree

Definition at line 35 of file pr_tree.h.

Function Documentation

◆ pr_dict_itor_new()

dict_itor * pr_dict_itor_new ( pr_tree * tree)

Definition at line 503 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_dict_new()

dict * pr_dict_new ( dict_compare_func cmp_func)

Definition at line 113 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_compare()

int pr_itor_compare ( const pr_itor * i1,
const pr_itor * i2 )

Definition at line 532 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_datum()

void ** pr_itor_datum ( pr_itor * itor)

Definition at line 531 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_first()

bool pr_itor_first ( pr_itor * itor)

Definition at line 523 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_free()

void pr_itor_free ( pr_itor * tree)

Definition at line 516 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_invalidate()

void pr_itor_invalidate ( pr_itor * itor)

Definition at line 518 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_key()

const void * pr_itor_key ( const pr_itor * itor)

Definition at line 530 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_last()

bool pr_itor_last ( pr_itor * itor)

Definition at line 524 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_new()

pr_itor * pr_itor_new ( pr_tree * tree)

Definition at line 492 of file pr_tree.c.

◆ pr_itor_next()

bool pr_itor_next ( pr_itor * itor)

Definition at line 519 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_nextn()

bool pr_itor_nextn ( pr_itor * itor,
size_t count )

Definition at line 521 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_prev()

bool pr_itor_prev ( pr_itor * itor)

Definition at line 520 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_prevn()

bool pr_itor_prevn ( pr_itor * itor,
size_t count )

Definition at line 522 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_remove()

bool pr_itor_remove ( pr_itor * itor)

Definition at line 535 of file pr_tree.c.

◆ pr_itor_search()

bool pr_itor_search ( pr_itor * itor,
const void * key )

Definition at line 525 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_search_ge()

bool pr_itor_search_ge ( pr_itor * itor,
const void * key )

Definition at line 528 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_search_gt()

bool pr_itor_search_gt ( pr_itor * itor,
const void * key )

Definition at line 529 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_search_le()

bool pr_itor_search_le ( pr_itor * itor,
const void * key )

Definition at line 526 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_search_lt()

bool pr_itor_search_lt ( pr_itor * itor,
const void * key )

Definition at line 527 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_itor_valid()

bool pr_itor_valid ( const pr_itor * itor)

Definition at line 517 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_tree_clear()

size_t pr_tree_clear ( pr_tree * tree,
dict_delete_func delete_func )

Definition at line 338 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_tree_count()

size_t pr_tree_count ( const pr_tree * tree)

Definition at line 375 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_tree_free()

size_t pr_tree_free ( pr_tree * tree,
dict_delete_func delete_func )

Definition at line 126 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_tree_insert()

dict_insert_result pr_tree_insert ( pr_tree * tree,
void * key )

Definition at line 252 of file pr_tree.c.

◆ pr_tree_max_path_length()

size_t pr_tree_max_path_length ( const pr_tree * tree)

Definition at line 376 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_tree_min_path_length()

size_t pr_tree_min_path_length ( const pr_tree * tree)

Definition at line 377 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_tree_new()

pr_tree * pr_tree_new ( dict_compare_func cmp_func)

Definition at line 98 of file pr_tree.c.

◆ pr_tree_remove()

dict_remove_result pr_tree_remove ( pr_tree * tree,
const void * key )

Definition at line 328 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_tree_search()

void ** pr_tree_search ( pr_tree * tree,
const void * key )

Definition at line 127 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_tree_search_ge()

void ** pr_tree_search_ge ( pr_tree * tree,
const void * key )

Definition at line 130 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_tree_search_gt()

void ** pr_tree_search_gt ( pr_tree * tree,
const void * key )

Definition at line 131 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_tree_search_le()

void ** pr_tree_search_le ( pr_tree * tree,
const void * key )

Definition at line 128 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_tree_search_lt()

void ** pr_tree_search_lt ( pr_tree * tree,
const void * key )

Definition at line 129 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_tree_select()

bool pr_tree_select ( pr_tree * tree,
size_t n,
const void ** key,
void ** datum )

Definition at line 347 of file pr_tree.c.

◆ pr_tree_total_path_length()

size_t pr_tree_total_path_length ( const pr_tree * tree)

Definition at line 378 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_tree_traverse()

size_t pr_tree_traverse ( pr_tree * tree,
dict_visit_func visit,
void * user_data )

Definition at line 341 of file pr_tree.c.

Here is the call graph for this function:

◆ pr_tree_verify()

bool pr_tree_verify ( const pr_tree * tree)

Definition at line 481 of file pr_tree.c.