8 typedef struct _tree_t
{
9 struct _tree_t
**child
;
10 struct _tree_t
*parent
;
11 struct _tree_t
*tab_child
; /*the pointer to be freed*/
17 int dumb
; /* 1 if the node belongs to a dumb tree: hence has to be freed separately*/
20 /* Maximum number of levels in the tree*/
21 #define MAX_LEVELS 100
24 int *arity
; /* arity of the nodes of each level*/
25 int nb_levels
; /*number of levels of the tree*/
26 int *nb_nodes
; /*nb of nodes of each level*/
27 int **node_id
; /*ID of the nodes of the tree for each level*/
32 tree_t
* build_tree(double **tab
,int N
);
33 tree_t
* build_tree_from_topology(tm_topology_t
*topology
,double **tab
,int N
,double *obj_weight
, double *comm_speed
);
34 void map_tree(tree_t
*,tree_t
*);
35 void display_tab(double **tab
,int N
);
36 double speed(int depth
);
37 void set_node(tree_t
*node
,tree_t
** child
, int arity
,tree_t
*parent
,int id
,double val
,tree_t
*deb_tab_child
);
38 void free_tree(tree_t
*tree
);
39 void free_tab_double(double**tab
,int N
);
40 void free_tab_int(int**tab
,int N
);
41 void update_val(double **tab
,tree_t
*parent
,int N
);
43 typedef struct _group_list_t
{
44 struct _group_list_t
*next
;