OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Classes | Macros | Typedefs | Functions
avl.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  avl_node_t
 
struct  avl_tree_t
 

Macros

#define AVL_DEPTH
 
#define AVL_COUNT
 

Typedefs

typedef int(* avl_compare_t) (const void *, const void *)
 
typedef void(* avl_freeitem_t) (void *)
 
typedef struct avl_node_t avl_node_t
 
typedef struct avl_tree_t avl_tree_t
 

Functions

avl_tree_tavl_init_tree (avl_tree_t *avltree, avl_compare_t, avl_freeitem_t)
 
avl_tree_tavl_alloc_tree (avl_compare_t, avl_freeitem_t)
 
void avl_free_tree (avl_tree_t *)
 
void avl_clear_tree (avl_tree_t *)
 
void avl_free_nodes (avl_tree_t *)
 
avl_node_tavl_init_node (avl_node_t *avlnode, void *item)
 
avl_node_tavl_insert (avl_tree_t *, void *item)
 
avl_node_tavl_insert_node (avl_tree_t *, avl_node_t *)
 
avl_node_tavl_insert_top (avl_tree_t *, avl_node_t *avlnode)
 
avl_node_tavl_insert_before (avl_tree_t *, avl_node_t *old, avl_node_t *n)
 
avl_node_tavl_insert_after (avl_tree_t *, avl_node_t *old, avl_node_t *n)
 
void avl_unlink_node (avl_tree_t *, avl_node_t *)
 
void * avl_delete_node (avl_tree_t *, avl_node_t *)
 
void * avl_delete (avl_tree_t *, const void *item)
 
avl_node_tavl_fixup_node (avl_tree_t *, avl_node_t *n)
 
int avl_search_closest (const avl_tree_t *, const void *item, avl_node_t **avlnode)
 
avl_node_tavl_search (const avl_tree_t *, const void *item)
 
unsigned int avl_count (const avl_tree_t *)
 
avl_node_tavl_at (const avl_tree_t *, unsigned int)
 
unsigned int avl_index (const avl_node_t *)
 

Macro Definition Documentation

◆ AVL_COUNT

#define AVL_COUNT

Definition at line 36 of file avl.h.

◆ AVL_DEPTH

#define AVL_DEPTH

Definition at line 35 of file avl.h.

Typedef Documentation

◆ avl_compare_t

typedef int(* avl_compare_t) (const void *, const void *)

Definition at line 45 of file avl.h.

◆ avl_freeitem_t

typedef void(* avl_freeitem_t) (void *)

Definition at line 50 of file avl.h.

◆ avl_node_t

typedef struct avl_node_t avl_node_t

◆ avl_tree_t

typedef struct avl_tree_t avl_tree_t

Function Documentation

◆ avl_alloc_tree()

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().

Here is the call graph for this function:

◆ avl_at()

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.

◆ avl_clear_tree()

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().

◆ avl_count()

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.

◆ avl_delete()

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().

Here is the call graph for this function:

◆ avl_delete_node()

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().

Here is the call graph for this function:

◆ avl_fixup_node()

avl_node_t * avl_fixup_node ( avl_tree_t avltree,
avl_node_t n 
)

◆ avl_free_nodes()

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().

Here is the call graph for this function:

◆ avl_free_tree()

void avl_free_tree ( avl_tree_t avltree)

Definition at line 218 of file avl.cpp.

References avl_free_nodes().

Here is the call graph for this function:

◆ avl_index()

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_init_node()

avl_node_t * avl_init_node ( avl_node_t avlnode,
void *  item 
)

Definition at line 233 of file avl.cpp.

Referenced by avl_insert(), and Hypervolume::hv3_AVL().

◆ avl_init_tree()

avl_tree_t * avl_init_tree ( avl_tree_t avltree,
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_insert()

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().

Here is the call graph for this function:

◆ avl_insert_after()

avl_node_t * avl_insert_after ( avl_tree_t avltree,
avl_node_t old,
avl_node_t n 
)

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().

Here is the call graph for this function:

◆ avl_insert_before()

avl_node_t * avl_insert_before ( avl_tree_t avltree,
avl_node_t old,
avl_node_t n 
)

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().

Here is the call graph for this function:

◆ 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().

Here is the call graph for this function:

◆ avl_insert_top()

avl_node_t * avl_insert_top ( avl_tree_t avltree,
avl_node_t avlnode 
)

◆ avl_search()

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().

Here is the call graph for this function:

◆ avl_search_closest()

int avl_search_closest ( const avl_tree_t avltree,
const void *  item,
avl_node_t **  avlnode 
)

◆ avl_unlink_node()

void avl_unlink_node ( avl_tree_t avltree,
avl_node_t avlnode 
)