#include "bary.h"
Include dependency graph for functions.c:
Go to the source code of this file.
Defines | |
#define | STATIC |
Functions | |
STATIC int | layer_crossing (int level) |
STATIC void | array_to_level (int i) |
STATIC void | calc_all_layers_crossings (void) |
STATIC int | graph_crossings (void) |
STATIC void | level_to_array (int i, int dir) |
|
Definition at line 2 of file functions.c. |
|
Definition at line 64 of file functions.c. References GNLIST, sort_array, STATIC, and tmp_layer. Referenced by phase2_down(), phase2_up(), resort_down_layer(), resort_up_layer(), tree_horizontal_order(), and unmerge_connected_parts().
00064 { 00065 int j; GNLIST hn; ; j = 0; hn = ((tmp_layer[i]).succlist); 00066 while (hn) { 00067 ((hn)->node) = sort_array[j++]; hn = ((hn)->next); 00068 } 00069 } |
|
Definition at line 71 of file functions.c. References layer_crossing(), maxdepth, STATIC, and tmp_layer. Referenced by checkcrossing().
00071 { 00072 int i; 00073 for (i = 0; i <= maxdepth; i++) 00074 ((tmp_layer[i]).cross) = layer_crossing (i); 00075 } |
|
Definition at line 77 of file functions.c. References maxdepth, STATIC, and tmp_layer. Referenced by barycentering(), checkcrossing(), phase2_down(), and phase2_up().
|
|
Definition at line 5 of file functions.c. References ADJEDGE, finish_lower(), finish_upper(), GNLIST, lower_list, lower_list_end, nr_tcrossings, size_lower_list, size_upper_list, STATIC, tmp_layer, upper_list, and upper_list_end. Referenced by calc_all_layers_crossings(), phase2_down(), phase2_up(), resort_down_layer(), and resort_up_layer().
00005 { 00006 GNLIST vl1, vl2; 00007 ADJEDGE a; int i; 00008 vl1 = ((tmp_layer[level]).succlist); 00009 while (vl1) { 00010 ((((vl1)->node))->tmpadj) = ((((vl1)->node))->succ); 00011 vl1 = ((vl1)->next); 00012 } 00013 vl2 = ((tmp_layer[level + 1]).succlist); 00014 while (vl2) { 00015 ((((vl2)->node))->tmpadj) = ((((vl2)->node))->pred); 00016 vl2 = ((vl2)->next); 00017 } 00018 i = 1; 00019 vl1 = ((tmp_layer[level]).succlist); 00020 while (vl1) { 00021 ((((vl1)->node))->Vpointer) = ((void *) 0); 00022 ((((vl1)->node))->position) = i; 00023 a = ((((vl1)->node))->succ); 00024 while (a) { 00025 (((((((((a)->kante))->end)))->tmpadj))->kante) = ((a)->kante); 00026 (((((((a)->kante))->end)))->tmpadj) = (((((((((a)->kante))->end)))->tmpadj))->next); 00027 a = ((a)->next); 00028 } vl1 = ((vl1)->next); 00029 i = i + 2; 00030 } 00031 i = 2; 00032 vl2 = ((tmp_layer[level + 1]).succlist); 00033 while (vl2) { 00034 ((((vl2)->node))->Vpointer) = ((void *) 0); 00035 ((((vl2)->node))->position) = i; 00036 a = ((((vl2)->node))->pred); 00037 while (a) { 00038 (((((((((a)->kante))->start)))->tmpadj))->kante) = ((a)->kante); 00039 (((((((a)->kante))->start)))->tmpadj) = (((((((((a)->kante))->start)))->tmpadj))->next); 00040 a = ((a)->next); 00041 } 00042 vl2 = ((vl2)->next); i = i + 2; 00043 } 00044 nr_tcrossings = 0; 00045 size_lower_list = size_upper_list = 0; 00046 lower_list = lower_list_end = ((void *) 0); 00047 upper_list = upper_list_end = ((void *) 0); 00048 vl1 = ((tmp_layer[level]).succlist); 00049 vl2 = ((tmp_layer[level + 1]).succlist); 00050 00051 while ((vl1) || (vl2)) { 00052 if (vl1) { 00053 finish_upper (((vl1)->node)); 00054 vl1 = ((vl1)->next); 00055 } 00056 if (vl2) { 00057 finish_lower (((vl2)->node)); 00058 vl2 = ((vl2)->next); 00059 } 00060 }; 00061 return (nr_tcrossings); 00062 } |
|
Definition at line 86 of file functions.c. References GNLIST, sort_array, STATIC, and tmp_layer. Referenced by phase2_down(), phase2_up(), resort_down_layer(), resort_up_layer(), and tree_horizontal_order().
00087 { 00088 int j; GNLIST hn; ; 00089 exit(0); 00090 assert(tmp_layer); 00091 hn = ((tmp_layer[i]).succlist); j = 0; 00092 while (hn) 00093 { 00094 sort_array[j++] = ((hn)->node); 00095 hn = ((hn)->next); 00096 } 00097 if (dir == 'd') { 00098 hn = ((tmp_layer[i - 1]).succlist); 00099 } else { 00100 hn = ((tmp_layer[i + 1]).succlist); 00101 } j = 1; 00102 00103 while (hn) { 00104 ((((hn)->node))->position) = j++; 00105 hn = ((hn)->next); 00106 } 00107 } |