OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
|
Go to the source code of this file.
Macros | |
#define | NODE_COUNT(n) ((n) ? (n)->count : 0) |
#define | L_COUNT(n) (NODE_COUNT((n)->left)) |
#define | R_COUNT(n) (NODE_COUNT((n)->right)) |
#define | CALC_COUNT(n) (L_COUNT(n) + R_COUNT(n) + 1) |
#define | NODE_DEPTH(n) ((n) ? (n)->depth : 0) |
#define | L_DEPTH(n) (NODE_DEPTH((n)->left)) |
#define | R_DEPTH(n) (NODE_DEPTH((n)->right)) |
#define | CALC_DEPTH(n) ((L_DEPTH(n)>R_DEPTH(n)?L_DEPTH(n):R_DEPTH(n)) + 1) |
#define L_COUNT | ( | n | ) | (NODE_COUNT((n)->left)) |
#define L_DEPTH | ( | n | ) | (NODE_DEPTH((n)->left)) |
#define R_COUNT | ( | n | ) | (NODE_COUNT((n)->right)) |
#define R_DEPTH | ( | n | ) | (NODE_DEPTH((n)->right)) |
avl_tree_t * avl_alloc_tree | ( | avl_compare_t | cmp, |
avl_freeitem_t | freeitem | ||
) |
Definition at line 189 of file avl.cpp.
References avl_init_tree().
Referenced by Hypervolume::FromFile().
avl_node_t * avl_at | ( | const avl_tree_t * | avltree, |
unsigned int | index | ||
) |
Definition at line 97 of file avl.cpp.
References Physics::c, L_COUNT, avl_node_t::left, avl_node_t::right, and avl_tree_t::top.
void avl_clear_tree | ( | avl_tree_t * | avltree | ) |
Definition at line 193 of file avl.cpp.
References avl_tree_t::head, avl_tree_t::tail, and avl_tree_t::top.
Referenced by avl_free_nodes(), and Hypervolume::hv3_AVL().
unsigned int avl_count | ( | const avl_tree_t * | avltree | ) |
Definition at line 93 of file avl.cpp.
References NODE_COUNT, and avl_tree_t::top.
void * avl_delete | ( | avl_tree_t * | avltree, |
const void * | item | ||
) |
Definition at line 406 of file avl.cpp.
References avl_delete_node(), and avl_search().
void * avl_delete_node | ( | avl_tree_t * | avltree, |
avl_node_t * | avlnode | ||
) |
Definition at line 394 of file avl.cpp.
References avl_unlink_node(), avl_tree_t::freeitem, and avl_node_t::item.
Referenced by avl_delete().
avl_node_t * avl_fixup_node | ( | avl_tree_t * | avltree, |
avl_node_t * | newnode | ||
) |
Definition at line 410 of file avl.cpp.
References avl_tree_t::head, avl_node_t::left, avl_node_t::next, avl_node_t::parent, avl_node_t::prev, avl_node_t::right, avl_tree_t::tail, and avl_tree_t::top.
void avl_free_nodes | ( | avl_tree_t * | avltree | ) |
Definition at line 197 of file avl.cpp.
References avl_clear_tree(), avl_tree_t::freeitem, avl_tree_t::head, avl_node_t::item, and avl_node_t::next.
Referenced by avl_free_tree().
void avl_free_tree | ( | avl_tree_t * | avltree | ) |
Definition at line 218 of file avl.cpp.
References avl_free_nodes().
unsigned int avl_index | ( | const avl_node_t * | avlnode | ) |
Definition at line 118 of file avl.cpp.
References Physics::c, L_COUNT, avl_node_t::parent, and avl_node_t::right.
avl_node_t * avl_init_node | ( | avl_node_t * | newnode, |
void * | item | ||
) |
Definition at line 233 of file avl.cpp.
Referenced by avl_insert(), and Hypervolume::hv3_AVL().
avl_tree_t * avl_init_tree | ( | avl_tree_t * | rc, |
avl_compare_t | cmp, | ||
avl_freeitem_t | freeitem | ||
) |
Definition at line 178 of file avl.cpp.
References avl_tree_t::cmp, avl_tree_t::freeitem, avl_tree_t::head, avl_tree_t::tail, and avl_tree_t::top.
Referenced by avl_alloc_tree().
avl_node_t * avl_insert | ( | avl_tree_t * | avltree, |
void * | item | ||
) |
Definition at line 321 of file avl.cpp.
References avl_init_node(), and avl_insert_node().
avl_node_t * avl_insert_after | ( | avl_tree_t * | avltree, |
avl_node_t * | node, | ||
avl_node_t * | newnode | ||
) |
Definition at line 274 of file avl.cpp.
References avl_insert_before(), avl_insert_top(), avl_tree_t::head, avl_node_t::next, and avl_node_t::right.
Referenced by avl_insert_before(), avl_insert_node(), and Hypervolume::hv3_AVL().
avl_node_t * avl_insert_before | ( | avl_tree_t * | avltree, |
avl_node_t * | node, | ||
avl_node_t * | newnode | ||
) |
Definition at line 248 of file avl.cpp.
References avl_insert_after(), avl_insert_top(), avl_node_t::left, avl_node_t::prev, and avl_tree_t::tail.
Referenced by avl_insert_after(), and avl_insert_node().
avl_node_t * avl_insert_node | ( | avl_tree_t * | avltree, |
avl_node_t * | newnode | ||
) |
Definition at line 300 of file avl.cpp.
References avl_insert_after(), avl_insert_before(), avl_insert_top(), avl_search_closest(), avl_node_t::item, and avl_tree_t::top.
Referenced by avl_insert().
avl_node_t * avl_insert_top | ( | avl_tree_t * | avltree, |
avl_node_t * | newnode | ||
) |
Definition at line 241 of file avl.cpp.
Referenced by avl_insert_after(), avl_insert_before(), avl_insert_node(), and Hypervolume::hv3_AVL().
avl_node_t * avl_search | ( | const avl_tree_t * | avltree, |
const void * | item | ||
) |
Definition at line 173 of file avl.cpp.
References avl_search_closest().
Referenced by avl_delete().
int avl_search_closest | ( | const avl_tree_t * | avltree, |
const void * | item, | ||
avl_node_t ** | avlnode | ||
) |
Definition at line 134 of file avl.cpp.
References Physics::c, avl_tree_t::cmp, avl_node_t::item, avl_node_t::left, avl_node_t::right, and avl_tree_t::top.
Referenced by avl_insert_node(), avl_search(), and Hypervolume::hv3_AVL().
void avl_unlink_node | ( | avl_tree_t * | avltree, |
avl_node_t * | avlnode | ||
) |
Definition at line 340 of file avl.cpp.
References avl_tree_t::head, avl_node_t::left, avl_node_t::next, avl_node_t::parent, avl_node_t::prev, avl_node_t::right, avl_tree_t::tail, and avl_tree_t::top.
Referenced by avl_delete_node(), and Hypervolume::hv3_AVL().