00001
00002 #ifndef __GRAPHDUAL_H__
00003 #define __GRAPHDUAL_H__
00004 #include <stdlib.h>
00005 #include <stdio.h>
00006 #include <math.h>
00007 #include "cookInterface.h"
00008 #include "eg_mempool.h"
00009 #include "eg_list.h"
00010 #include "eg_dgraph.h"
00011 #include "eg_ugraph.h"
00012 #include "eg_equiset.h"
00013 #include "eg_bit.h"
00014 #include "eg_dijkstra.h"
00015 #include "eg_menger.h"
00016 #include "eg_menger_app.h"
00017 #include "bc_spanning.h"
00018 #include "eg_util.h"
00019 #include "dp_config.h"
00020 #include "graph_boyer.h"
00021
00022 #define GD_LEVEL 9
00023
00024
00025 int isPlanarBoyer (int nnodes,
00026 int nedges,
00027 int *edges);
00028
00029 int isPlanarOrMinorBoyer (int nnodes,
00030 int nedges,
00031 int *edges,
00032 int *nmedges,
00033 int *medges);
00034
00035
00036 EGdGraph_t *getDualBoyer (graphP G,
00037 int nnodes,
00038 int nedges,
00039 double *weigh,
00040 EGlist_t *** dembed,
00041 EGmemPool_t * localmem,
00042 EGlist_t***lembed);
00043
00044
00045
00046
00047 int DPfindBadEdge (int nnodes,
00048 int nedges,
00049 int *edges,
00050 double *weight);
00051
00052
00053
00054
00055 int DPfindBadEdgeK (int nnodes,
00056 int nedges,
00057 int *edges,
00058 double *weight,
00059 int k);
00060
00061
00062
00063 int DPedgeEliminationHeuristic (int nnodes,
00064 int nedges,
00065 int *edges,
00066 double *weight,
00067 int *nplanar_edges,
00068 int *planar_edges,
00069 double *planar_weight,
00070 int *nelim_indices,
00071 int *elim_indices);
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086 int DPbinPlanarizeBoyer (int nnodes,
00087 int nedges1,
00088 int nedges2,
00089 int *edges,
00090 double *weigh,
00091 int *nedges3,
00092 int *edges3,
00093 double *weigh3,
00094 int *elim_indices);
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105 int DPgetMinorNodesToContract (int nnodes,
00106 int nedges,
00107 int *edges,
00108 int *node_1,
00109 int *node_2);
00110
00111
00112
00113 int DPgetNonMinorNodesToContract (int nnodes,
00114 int nedges,
00115 int *edges,
00116 double *weight,
00117 int *node_1,
00118 int *node_2);
00119
00120 int DPgetTrivialNodesToContract (int nnodes,
00121 int nedges,
00122 int *edges,
00123 double *weight,
00124 int *node_1,
00125 int *node_2);
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137 int DPfastEdgeEliminationHeuristic (int nnodes,
00138 int nedges1,
00139 int *edges,
00140 double *weight,
00141 int *nedges2,
00142 int *edges2,
00143 double *weight2,
00144 int *nelim,
00145 int *elim_indices,
00146 int k_param);
00147
00148 int DPfindBadBinEdge (int nnodes,
00149 int nedges,
00150 int *edges);
00151
00152 int DPfindBadBinEdgeK (int nnodes,
00153 int nedges,
00154 int *edges,
00155 double *weight,
00156 int k);
00157
00158 int DPgetBinMinor (int nnodes,
00159 int nedges,
00160 int *edges,
00161 int *nmedges,
00162 int *medges,
00163 int k);
00164 #endif