00001 #ifndef EG_MENGER_APP
00002 #define EG_MENGER_APP
00003
00004 #include "eg_macros.h"
00005 #include "eg_mempool.h"
00006 #include "eg_list.h"
00007
00008 #include "eg_heap.h"
00009 #include "eg_dgraph.h"
00010 #include "eg_dijkstra.h"
00011 #include "eg_menger.h"
00012
00013 typedef struct
00014 {
00015
00016 EGdijkstraCost_t cost,
00017 reduced_cost;
00018 void *is_in_solution;
00019 void *data;
00020
00021 }
00022 EGmengerEdgeData_t;
00023
00024 typedef struct
00025 {
00026
00027
00028 EGdijkstraCost_t pi;
00029
00030
00031 EGdijkstraCost_t dist,
00032 orig_dist;
00033 unsigned int ndist,
00034 orig_ndist;
00035 unsigned int marker,
00036 orig_marker;
00037 EGdGraphEdge_t *father,
00038 *orig_father;
00039 EGheapConnector_t *hc;
00040
00041 }
00042 EGmengerNodeData_t;
00043
00044 EGmengerNodeData_t *EGnewMengerNodeData (EGmemPool_t * mem);
00045 EGmengerEdgeData_t *EGnewMengerEdgeData (EGmemPool_t * mem);
00046
00047 void EGfreeMengerEdgeDataMP (void *v,
00048 EGmemPool_t * mem);
00049 void EGfreeMengerNodeDataMP (void *v,
00050 EGmemPool_t * mem);
00051
00052 EGdGraph_t *EGnewMengerGraph (EGmemPool_t * mem,
00053 int nNodes,
00054 int nEdges,
00055 int *edges,
00056 EGdijkstraCost_t * weight,
00057 size_t ** os);
00058
00059 int EGmengerPathsBAS (unsigned int s,
00060 unsigned int t,
00061 EGdijkstraCost_t ubound,
00062 EGdijkstraCost_t * menger_val,
00063 unsigned int npaths,
00064 unsigned int *iedges,
00065 unsigned int *iedges_beg,
00066 int nNodes,
00067 int nEdges,
00068 int *edges,
00069 EGdijkstraCost_t * weight,
00070 EGmemPool_t * mem);
00071
00072 int EGmengerPaths (EGdGraphNode_t * s,
00073 EGdGraphNode_t * t,
00074 EGdijkstraCost_t ubound,
00075 EGdijkstraCost_t * menger_val,
00076 unsigned int npaths,
00077 EGdGraphEdge_t ** pedges,
00078 unsigned int *pedges_beg,
00079 size_t * os,
00080 EGdGraph_t * G);
00081
00082 void EGmengerDisplayEdgeBasic (void *v,
00083 FILE * file);
00084
00085 void EGmengerDisplayEdgeData (void *v,
00086 FILE * file);
00087 void EGmengerDisplayNodeData (void *v,
00088 FILE * file);
00089
00090 void EGmengerSetOs (size_t ** os,
00091 EGmemPool_t * mem);
00092
00093 EGdijkstraCost_t EGmengerEdgeCost (EGdGraphEdge_t * e);
00094
00095 #endif