gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
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_struct
 
struct  avl_tree_struct
 
struct  avl_generator_struct
 

Macros

#define AVL_FORWARD   0
 
#define AVL_BACKWARD   1
 
#define AVL_MOST_LEFT   0
 
#define AVL_MOST_RIGHT   1
 
#define avl_is_member(tree, key)   avl_lookup(tree, key, (void **) 0)
 
#define NIL(type)   (type *) 0
 
#define avl_foreach_item(table, gen, dir, key_p, value_p)
 

Typedefs

typedef struct avl_node_struct avl_node
 
typedef struct avl_tree_struct avl_tree
 
typedef struct avl_generator_struct avl_generator
 

Functions

void avl_walk_forward (avl_node *node, void(*func)(void *key, void *value))
 
void avl_walk_backward (avl_node *node, void(*func)(void *key, void *value))
 
void avl_foreach (avl_tree *tree, void(*func)(void *key, void *value), int direction)
 
avl_treeavl_init_table (int(*compar)(const void *key1, const void *key2))
 
int avl_lookup (avl_tree *tree, void *key, void **value_p)
 
int avl_insert (avl_tree *tree, void *key, void *value)
 
int avl_delete (avl_tree *tree, void **key_p, void **value_p)
 
void avl_free_table (avl_tree *tree, void(*key_free)(void *key), void(*value_free)(void *value))
 
int avl_count (avl_tree *tree)
 
int avl_check_tree (avl_tree *tree)
 
int avl_extremum (avl_tree *tree, int side, void **value_p)
 
avl_generatoravl_init_gen (avl_tree *tree, int dir)
 
int avl_gen (avl_generator *gen, void **key_p, void **value_p)
 
void avl_free_gen (avl_generator *gen)
 
int avl_numcmp (const void *x, const void *y)
 

Macro Definition Documentation

◆ AVL_BACKWARD

#define AVL_BACKWARD   1

Definition at line 59 of file avl.h.

◆ avl_foreach_item

#define avl_foreach_item (   table,
  gen,
  dir,
  key_p,
  value_p 
)
Value:
for(gen = avl_init_gen(table, dir); \
avl_gen(gen, key_p, value_p) || (avl_free_gen(gen),0);)

Definition at line 67 of file avl.h.

◆ AVL_FORWARD

#define AVL_FORWARD   0

Definition at line 58 of file avl.h.

◆ avl_is_member

#define avl_is_member (   tree,
  key 
)    avl_lookup(tree, key, (void **) 0)

Definition at line 64 of file avl.h.

◆ AVL_MOST_LEFT

#define AVL_MOST_LEFT   0

Definition at line 61 of file avl.h.

◆ AVL_MOST_RIGHT

#define AVL_MOST_RIGHT   1

Definition at line 62 of file avl.h.

◆ NIL

#define NIL (   type)    (type *) 0

Definition at line 65 of file avl.h.

Typedef Documentation

◆ avl_generator

Definition at line 1 of file avl.h.

◆ avl_node

typedef struct avl_node_struct avl_node

Definition at line 1 of file avl.h.

◆ avl_tree

typedef struct avl_tree_struct avl_tree

Definition at line 1 of file avl.h.

Function Documentation

◆ avl_check_tree()

int avl_check_tree ( avl_tree tree)

Definition at line 367 of file avl.cpp.

Here is the call graph for this function:

◆ avl_count()

int avl_count ( avl_tree tree)

Definition at line 345 of file avl.cpp.

Referenced by avl_init_gen(), and Tree_Nbr().

Here is the caller graph for this function:

◆ avl_delete()

int avl_delete ( avl_tree tree,
void **  key_p,
void **  value_p 
)

Definition at line 123 of file avl.cpp.

Referenced by Tree_Suppress().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ avl_extremum()

int avl_extremum ( avl_tree tree,
int  side,
void **  value_p 
)

Definition at line 309 of file avl.cpp.

◆ avl_foreach()

void avl_foreach ( avl_tree tree,
void(*)(void *key, void *value)  func,
int  direction 
)
inline

Definition at line 89 of file avl.h.

Referenced by Tree_Action().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ avl_free_gen()

void avl_free_gen ( avl_generator gen)

Definition at line 218 of file avl.cpp.

◆ avl_free_table()

void avl_free_table ( avl_tree tree,
void(*)(void *key)  key_free,
void(*)(void *value)  value_free 
)

Definition at line 339 of file avl.cpp.

Referenced by Tree_Delete().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ avl_gen()

int avl_gen ( avl_generator gen,
void **  key_p,
void **  value_p 
)

Definition at line 204 of file avl.cpp.

◆ avl_init_gen()

avl_generator* avl_init_gen ( avl_tree tree,
int  dir 
)

Definition at line 183 of file avl.cpp.

Here is the call graph for this function:

◆ avl_init_table()

avl_tree* avl_init_table ( int(*)(const void *key1, const void *key2)  compar)

Definition at line 67 of file avl.cpp.

Referenced by Tree_Create().

Here is the caller graph for this function:

◆ avl_insert()

int avl_insert ( avl_tree tree,
void *  key,
void *  value 
)

Definition at line 96 of file avl.cpp.

Referenced by Tree_Add().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ avl_lookup()

int avl_lookup ( avl_tree tree,
void *  key,
void **  value_p 
)

Definition at line 78 of file avl.cpp.

Referenced by Tree_PQuery(), Tree_Query(), and Tree_Search().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ avl_numcmp()

int avl_numcmp ( const void *  x,
const void *  y 
)

Definition at line 362 of file avl.cpp.

◆ avl_walk_backward()

void avl_walk_backward ( avl_node node,
void(*)(void *key, void *value)  func 
)
inline

Definition at line 80 of file avl.h.

Referenced by avl_foreach().

Here is the caller graph for this function:

◆ avl_walk_forward()

void avl_walk_forward ( avl_node node,
void(*)(void *key, void *value)  func 
)
inline

Definition at line 71 of file avl.h.

Referenced by avl_foreach().

Here is the caller graph for this function:
avl_free_gen
void avl_free_gen(avl_generator *gen)
Definition: avl.cpp:218
avl_init_gen
avl_generator * avl_init_gen(avl_tree *tree, int dir)
Definition: avl.cpp:183