OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
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

#define AVL_COUNT

Definition at line 36 of file avl.h.

#define AVL_DEPTH

Definition at line 35 of file avl.h.

Typedef Documentation

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

Definition at line 45 of file avl.h.

typedef void(* avl_freeitem_t)(void *)

Definition at line 50 of file avl.h.

typedef struct avl_node_t avl_node_t
typedef struct avl_tree_t avl_tree_t

Function Documentation

avl_tree_t* avl_alloc_tree ( avl_compare_t  ,
avl_freeitem_t   
)

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_node_t* avl_at ( const avl_tree_t ,
unsigned  int 
)

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 )

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 )

Definition at line 93 of file avl.cpp.

References NODE_COUNT, and avl_tree_t::top.

void* avl_delete ( avl_tree_t ,
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:

void* avl_delete_node ( avl_tree_t ,
avl_node_t  
)

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_node_t* avl_fixup_node ( avl_tree_t ,
avl_node_t n 
)
void avl_free_nodes ( avl_tree_t )

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:

void avl_free_tree ( avl_tree_t )

Definition at line 218 of file avl.cpp.

References avl_free_nodes().

Here is the call graph for this function:

unsigned int avl_index ( const avl_node_t )

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 avlnode,
void *  item 
)

Definition at line 233 of file avl.cpp.

References avl_node_t::item.

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

avl_tree_t* avl_init_tree ( avl_tree_t avltree,
avl_compare_t  ,
avl_freeitem_t   
)

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 ,
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_node_t* avl_insert_after ( avl_tree_t ,
avl_node_t old,
avl_node_t n 
)
avl_node_t* avl_insert_before ( avl_tree_t ,
avl_node_t old,
avl_node_t n 
)

Definition at line 248 of file avl.cpp.

References avl_insert_after(), avl_insert_top(), avl_tree_t::head, avl_node_t::left, avl_node_t::next, avl_node_t::parent, 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_node_t* avl_insert_node ( avl_tree_t ,
avl_node_t  
)

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_node_t* avl_insert_top ( avl_tree_t ,
avl_node_t avlnode 
)
avl_node_t* avl_search ( const avl_tree_t ,
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:

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