gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
#include "GmshConfig.h"
#include <stdint.h>
#include <stdio.h>
#include "avl.h"
#include "MallocUtils.h"
Go to the source code of this file.
Macros | |
#define | ALLOC(type, number) (type *) Malloc((unsigned) sizeof(type) * number) |
#define | FREE(item) (void) Free(item) |
#define | XRNMAX(a, b) ((a) > (b) ? (a) : (b)) |
#define | HEIGHT(node) (node == NIL(avl_node) ? -1 : (node)->height) |
#define | BALANCE(node) (HEIGHT((node)->right) - HEIGHT((node)->left)) |
#define | compute_height(node) |
#define | COMPARE(key, nodekey, compare) |
Functions | |
static void | avl_record_gen_forward (avl_node *node, avl_generator *gen) |
static void | avl_record_gen_backward (avl_node *node, avl_generator *gen) |
static avl_node * | find_rightmost (avl_node **node_p) |
static void | do_rebalance (avl_node ***stack_nodep, int stack_n) |
static void | rotate_left (avl_node **node_p) |
static void | rotate_right (avl_node **node_p) |
static void | free_entry (avl_node *node, void(*key_free)(void *key), void(*value_free)(void *value)) |
static avl_node * | new_node (void *key, void *value) |
static int | do_check_tree (avl_node *node, int(*compar)(const void *key1, const void *key2), int *error) |
avl_tree * | avl_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) |
avl_generator * | avl_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_extremum (avl_tree *tree, int side, 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_numcmp (const void *x, const void *y) |
int | avl_check_tree (avl_tree *tree) |
#define ALLOC | ( | type, | |
number | |||
) | (type *) Malloc((unsigned) sizeof(type) * number) |
#define COMPARE | ( | key, | |
nodekey, | |||
compare | |||
) |
#define compute_height | ( | node | ) |
int avl_check_tree | ( | avl_tree * | tree | ) |
int avl_count | ( | avl_tree * | tree | ) |
Definition at line 345 of file avl.cpp.
Referenced by avl_init_gen(), and Tree_Nbr().
int avl_delete | ( | avl_tree * | tree, |
void ** | key_p, | ||
void ** | value_p | ||
) |
Definition at line 123 of file avl.cpp.
Referenced by Tree_Suppress().
int avl_extremum | ( | avl_tree * | tree, |
int | side, | ||
void ** | value_p | ||
) |
void avl_free_gen | ( | avl_generator * | gen | ) |
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().
int avl_gen | ( | avl_generator * | gen, |
void ** | key_p, | ||
void ** | value_p | ||
) |
avl_generator* avl_init_gen | ( | avl_tree * | tree, |
int | dir | ||
) |
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().
int avl_insert | ( | avl_tree * | tree, |
void * | key, | ||
void * | value | ||
) |
Definition at line 96 of file avl.cpp.
Referenced by Tree_Add().
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().
|
static |
Definition at line 174 of file avl.cpp.
Referenced by avl_init_gen().
|
static |
Definition at line 165 of file avl.cpp.
Referenced by avl_init_gen().
|
static |
Definition at line 374 of file avl.cpp.
Referenced by avl_check_tree().
|
static |
Definition at line 242 of file avl.cpp.
Referenced by avl_delete(), avl_insert(), and find_rightmost().
Definition at line 224 of file avl.cpp.
Referenced by avl_delete().
|
static |
Definition at line 328 of file avl.cpp.
Referenced by avl_free_table().
|
static |
Definition at line 350 of file avl.cpp.
Referenced by avl_insert().
|
static |
Definition at line 266 of file avl.cpp.
Referenced by do_rebalance().
|
static |
Definition at line 287 of file avl.cpp.
Referenced by do_rebalance().