#include <assert.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "avl.h"#include <stddef.h>

Go to the source code of this file.
Functions | |
| struct avl_table * | avl_create (avl_comparison_func *compare, void *param, struct libavl_allocator *allocator) |
| void * | avl_find (const struct avl_table *tree, const void *item) |
| void ** | avl_probe (struct avl_table *tree, void *item) |
| void * | avl_insert (struct avl_table *table, void *item) |
| void * | avl_replace (struct avl_table *table, void *item) |
| void * | avl_delete (struct avl_table *tree, const void *item) |
| void | avl_t_init (struct avl_traverser *trav, struct avl_table *tree) |
| void * | avl_t_first (struct avl_traverser *trav, struct avl_table *tree) |
| void * | avl_t_last (struct avl_traverser *trav, struct avl_table *tree) |
| void * | avl_t_find (struct avl_traverser *trav, struct avl_table *tree, void *item) |
| void * | avl_t_insert (struct avl_traverser *trav, struct avl_table *tree, void *item) |
| void * | avl_t_copy (struct avl_traverser *trav, const struct avl_traverser *src) |
| void * | avl_t_next (struct avl_traverser *trav) |
| void * | avl_t_prev (struct avl_traverser *trav) |
| void * | avl_t_cur (struct avl_traverser *trav) |
| void * | avl_t_replace (struct avl_traverser *trav, void *new) |
| struct avl_table * | avl_copy (const struct avl_table *org, avl_copy_func *copy, avl_item_func *destroy, struct libavl_allocator *allocator) |
| void | avl_destroy (struct avl_table *tree, avl_item_func *destroy) |
| void * | avl_malloc (struct libavl_allocator *allocator, size_t size) |
| void | avl_free (struct libavl_allocator *allocator, void *block) |
| void() | avl_assert_insert (struct avl_table *table, void *item) |
| void *() | avl_assert_delete (struct avl_table *table, void *item) |
Variables | |
| struct libavl_allocator | avl_allocator_default |
| void*() avl_assert_delete | ( | struct avl_table * | table, | |
| void * | item | |||
| ) |
Definition at line 815 of file avl.c.
References avl_delete().
| void() avl_assert_insert | ( | struct avl_table * | table, | |
| void * | item | |||
| ) |
Definition at line 806 of file avl.c.
References avl_probe().
| struct avl_table* avl_copy | ( | const struct avl_table * | org, | |
| avl_copy_func * | copy, | |||
| avl_item_func * | destroy, | |||
| struct libavl_allocator * | allocator | |||
| ) | [read] |
Definition at line 676 of file avl.c.
References avl_table::avl_alloc, avl_node::avl_balance, avl_table::avl_compare, avl_table::avl_count, avl_create(), avl_node::avl_data, avl_node::avl_link, AVL_MAX_HEIGHT, avl_table::avl_param, and avl_table::avl_root.
| struct avl_table* avl_create | ( | avl_comparison_func * | compare, | |
| void * | param, | |||
| struct libavl_allocator * | allocator | |||
| ) | [read] |
Definition at line 36 of file avl.c.
References avl_table::avl_alloc, avl_allocator_default, avl_table::avl_compare, avl_table::avl_count, avl_table::avl_generation, avl_table::avl_param, avl_table::avl_root, and libavl_allocator::libavl_malloc.
Referenced by avl_copy(), dgl_edge_prioritizer_add(), dgl_initialize_V1(), dgl_initialize_V2(), DGL_SP_CACHE_INITIALIZE_FUNC(), DGL_UNFLATTEN_FUNC(), dglDepthComponents(), and dglDepthSpanning().
| void* avl_delete | ( | struct avl_table * | tree, | |
| const void * | item | |||
| ) |
Definition at line 219 of file avl.c.
References avl_table::avl_alloc, avl_node::avl_balance, avl_table::avl_compare, avl_table::avl_count, avl_node::avl_data, avl_table::avl_generation, avl_node::avl_link, AVL_MAX_HEIGHT, avl_table::avl_param, avl_table::avl_root, and libavl_allocator::libavl_free.
Referenced by avl_assert_delete(), DGL_DEL_EDGE_FUNC(), and DGL_DEL_NODE_FUNC().
| void avl_destroy | ( | struct avl_table * | tree, | |
| avl_item_func * | destroy | |||
| ) |
Definition at line 762 of file avl.c.
References avl_table::avl_alloc, avl_node::avl_data, avl_node::avl_link, avl_table::avl_param, avl_table::avl_root, and libavl_allocator::libavl_free.
Referenced by DGL_FLATTEN_FUNC(), dgl_release_V1(), dgl_release_V2(), DGL_SP_CACHE_RELEASE_FUNC(), DGL_UNFLATTEN_FUNC(), dglDepthComponents(), and dglDepthSpanning().
| void* avl_find | ( | const struct avl_table * | tree, | |
| const void * | item | |||
| ) |
Definition at line 62 of file avl.c.
References avl_table::avl_compare, avl_node::avl_data, avl_node::avl_link, avl_table::avl_param, and avl_table::avl_root.
Referenced by DGL_DEL_EDGE_FUNC(), DGL_DEL_NODE_FUNC(), DGL_DEL_NODE_INEDGE_FUNC(), DGL_DEL_NODE_OUTEDGE_FUNC(), dgl_edge_prioritizer_del(), DGL_EDGESET_T_FIRST_FUNC(), DGL_EDGESET_T_NEXT_FUNC(), DGL_GET_EDGE_FUNC(), DGL_GET_NODE_FUNC(), DGL_GET_NODE_INEDGESET_FUNC(), DGL_GET_NODE_OUTEDGESET_FUNC(), DGL_SPAN_DEPTHFIRST_SPANNING_FUNC(), DGL_SPAN_MINIMUM_SPANNING_FUNC(), and dglDepthComponents().
| void avl_free | ( | struct libavl_allocator * | allocator, | |
| void * | block | |||
| ) |
| void* avl_insert | ( | struct avl_table * | table, | |
| void * | item | |||
| ) |
Definition at line 192 of file avl.c.
References avl_probe().
| void* avl_malloc | ( | struct libavl_allocator * | allocator, | |
| size_t | size | |||
| ) |
| void** avl_probe | ( | struct avl_table * | tree, | |
| void * | item | |||
| ) |
Definition at line 85 of file avl.c.
References avl_table::avl_alloc, avl_node::avl_balance, avl_table::avl_compare, avl_table::avl_count, avl_node::avl_data, avl_table::avl_generation, avl_node::avl_link, AVL_MAX_HEIGHT, avl_table::avl_param, avl_table::avl_root, and libavl_allocator::libavl_malloc.
Referenced by avl_assert_insert(), avl_insert(), avl_replace(), avl_t_insert(), dglTreeEdgeAdd(), dglTreeEdgePri32Add(), dglTreeNode2Add(), dglTreeNodeAdd(), dglTreeNodePri32Add(), dglTreePredistAdd(), and dglTreeTouchI32Add().
| void* avl_replace | ( | struct avl_table * | table, | |
| void * | item | |||
| ) |
Definition at line 203 of file avl.c.
References avl_probe().
| void* avl_t_copy | ( | struct avl_traverser * | trav, | |
| const struct avl_traverser * | src | |||
| ) |
Definition at line 525 of file avl.c.
References avl_node::avl_data, avl_table::avl_generation, avl_traverser::avl_generation, avl_traverser::avl_height, avl_traverser::avl_node, avl_traverser::avl_stack, and avl_traverser::avl_table.
| void* avl_t_cur | ( | struct avl_traverser * | trav | ) |
Definition at line 636 of file avl.c.
References avl_node::avl_data, and avl_traverser::avl_node.
| void* avl_t_find | ( | struct avl_traverser * | trav, | |
| struct avl_table * | tree, | |||
| void * | item | |||
| ) |
Definition at line 464 of file avl.c.
References avl_table::avl_compare, avl_node::avl_data, avl_table::avl_generation, avl_traverser::avl_generation, avl_traverser::avl_height, avl_node::avl_link, AVL_MAX_HEIGHT, avl_traverser::avl_node, avl_table::avl_param, avl_table::avl_root, avl_traverser::avl_stack, and avl_traverser::avl_table.
Referenced by DGL_NODE_T_FIND_FUNC().
| void* avl_t_first | ( | struct avl_traverser * | trav, | |
| struct avl_table * | tree | |||
| ) |
Definition at line 412 of file avl.c.
References avl_node::avl_data, avl_table::avl_generation, avl_traverser::avl_generation, avl_traverser::avl_height, avl_node::avl_link, AVL_MAX_HEIGHT, avl_traverser::avl_node, avl_table::avl_root, avl_traverser::avl_stack, and avl_traverser::avl_table.
Referenced by avl_t_next(), DGL_EDGE_T_FIRST_FUNC(), DGL_FLATTEN_FUNC(), and DGL_NODE_T_FIRST_FUNC().
| void avl_t_init | ( | struct avl_traverser * | trav, | |
| struct avl_table * | tree | |||
| ) |
Definition at line 401 of file avl.c.
References avl_table::avl_generation, avl_traverser::avl_generation, avl_traverser::avl_height, avl_traverser::avl_node, and avl_traverser::avl_table.
Referenced by avl_t_insert(), DGL_EDGE_T_INITIALIZE_FUNC(), DGL_FLATTEN_FUNC(), and DGL_NODE_T_INITIALIZE_FUNC().
| void* avl_t_insert | ( | struct avl_traverser * | trav, | |
| struct avl_table * | tree, | |||
| void * | item | |||
| ) |
Definition at line 502 of file avl.c.
References avl_node::avl_data, avl_table::avl_generation, avl_traverser::avl_generation, avl_traverser::avl_node, avl_probe(), avl_t_init(), and avl_traverser::avl_table.
| void* avl_t_last | ( | struct avl_traverser * | trav, | |
| struct avl_table * | tree | |||
| ) |
Definition at line 437 of file avl.c.
References avl_node::avl_data, avl_table::avl_generation, avl_traverser::avl_generation, avl_traverser::avl_height, avl_node::avl_link, AVL_MAX_HEIGHT, avl_traverser::avl_node, avl_table::avl_root, avl_traverser::avl_stack, and avl_traverser::avl_table.
Referenced by avl_t_prev().
| void* avl_t_next | ( | struct avl_traverser * | trav | ) |
Definition at line 546 of file avl.c.
References avl_node::avl_data, avl_table::avl_generation, avl_traverser::avl_generation, avl_traverser::avl_height, avl_node::avl_link, AVL_MAX_HEIGHT, avl_traverser::avl_node, avl_traverser::avl_stack, avl_t_first(), and avl_traverser::avl_table.
Referenced by DGL_EDGE_T_NEXT_FUNC(), DGL_FLATTEN_FUNC(), and DGL_NODE_T_NEXT_FUNC().
| void* avl_t_prev | ( | struct avl_traverser * | trav | ) |
Definition at line 592 of file avl.c.
References avl_node::avl_data, avl_table::avl_generation, avl_traverser::avl_generation, avl_traverser::avl_height, avl_node::avl_link, AVL_MAX_HEIGHT, avl_traverser::avl_node, avl_traverser::avl_stack, avl_t_last(), and avl_traverser::avl_table.
| void* avl_t_replace | ( | struct avl_traverser * | trav, | |
| void * | new | |||
| ) |
Definition at line 646 of file avl.c.
References avl_node::avl_data, and avl_traverser::avl_node.
{
avl_malloc,
avl_free
}
Definition at line 800 of file avl.c.
Referenced by avl_create().
1.6.3