gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
TreeUtils.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 #ifndef TREE_UTILS_H
7 #define TREE_UTILS_H
8 
9 #include "avl.h"
10 #include "ListUtils.h"
11 
12 class Tree_T {
13 public:
14  int size;
16 };
17 
18 Tree_T *Tree_Create(int size, int (*fcmp)(const void *a, const void *b));
19 void Tree_Delete(Tree_T *Tree);
20 void Tree_Delete(Tree_T *Tree, void (*freefn)(void *));
21 void *Tree_Add(Tree_T *tree, void *data);
22 int Tree_Nbr(Tree_T *Tree);
23 int Tree_Insert(Tree_T *Tree, void *data);
24 int Tree_Search(Tree_T *Tree, void *data);
25 int Tree_Query(Tree_T *Tree, void *data);
26 void *Tree_PQuery(Tree_T *Tree, void *data);
27 int Tree_Suppress(Tree_T *Tree, void *data);
28 int Tree_Size(Tree_T *tree);
29 void Tree_Action(Tree_T *tree, void (*action)(void *data, void *dummy));
30 List_T *Tree2List(Tree_T *pTree);
31 
32 #endif
Tree_Add
void * Tree_Add(Tree_T *tree, void *data)
Definition: TreeUtils.cpp:37
Tree_Suppress
int Tree_Suppress(Tree_T *Tree, void *data)
Definition: TreeUtils.cpp:85
List_T
Definition: ListUtils.h:9
ListUtils.h
Tree_T
Definition: TreeUtils.h:12
Tree_Delete
void Tree_Delete(Tree_T *Tree)
Definition: TreeUtils.cpp:23
avl.h
Tree_Nbr
int Tree_Nbr(Tree_T *Tree)
Definition: TreeUtils.cpp:46
Tree_Query
int Tree_Query(Tree_T *Tree, void *data)
Definition: TreeUtils.cpp:68
Tree_PQuery
void * Tree_PQuery(Tree_T *Tree, void *data)
Definition: TreeUtils.cpp:77
Tree_T::root
avl_tree * root
Definition: TreeUtils.h:15
Tree_Size
int Tree_Size(Tree_T *tree)
Definition: TreeUtils.cpp:94
Tree2List
List_T * Tree2List(Tree_T *pTree)
Definition: TreeUtils.cpp:110
Tree_Insert
int Tree_Insert(Tree_T *Tree, void *data)
Definition: TreeUtils.cpp:52
Tree_T::size
int size
Definition: TreeUtils.h:14
Tree_Action
void Tree_Action(Tree_T *tree, void(*action)(void *data, void *dummy))
Definition: TreeUtils.cpp:100
Tree_Search
int Tree_Search(Tree_T *Tree, void *data)
Definition: TreeUtils.cpp:61
Tree_Create
Tree_T * Tree_Create(int size, int(*fcmp)(const void *a, const void *b))
Definition: TreeUtils.cpp:15
avl_tree_struct
Definition: avl.h:41