00001 #ifndef __EG_UTIL_H__
00002 #include <stdio.h>
00003 #include <stdlib.h>
00004 #include <math.h>
00005 #include "dp_config.h"
00006 #include "eg_mempool.h"
00007 #include "bc_util.h"
00008 #include "eg_nettype.h"
00009 #include "eg_dijkstra.h"
00010 #include "eg_ddomino.h"
00011 #include "eg_dgraph.h"
00012 #include "eg_ugraph.h"
00013 #include "eg_menger_app.h"
00014
00015
00016
00017 int removeSmallEdges (double maxval,
00018 int *orig_edges,
00019 int norig_edges,
00020 double *orig_weight,
00021 int *nedges,
00022 int **edges,
00023 double **weight,
00024 EGmemPool_t * mem);
00025
00026
00027
00028 int loadBGraph (const char *file,
00029 int *nNodes,
00030 int *nEdges,
00031 int **edges,
00032 double **weight);
00033
00034
00035
00036 int loadGraph (const char *file,
00037 int *nNodes,
00038 int *nEdges,
00039 int **edges,
00040 double **weight);
00041
00042
00043 int saveBgraph (const char *file_name,
00044 int nnodes,
00045 int nedges,
00046 int *edges,
00047 double *weight);
00048
00049 int saveGraph (const char *file_name,
00050 int const nnodes,
00051 int const nedges,
00052 int const *const edges,
00053 double const *const weight);
00054
00055 int saveSubGraph (const char *file_name,
00056 int nnodes,
00057 int nsubedges,
00058 int *edges,
00059 int *subedges,
00060 double *weight);
00061
00062
00063 int EGreceiveRealGraph (CC_SFILE * s,
00064 EGdGraph_t ** biDualG,
00065 EGmemPool_t * mem);
00066
00067
00068 int EGsendRealGraph (CC_SFILE * s,
00069 EGdGraph_t * biDualG,
00070 EGdGraphEdge_t *** dedges,
00071 EGdGraphNode_t *** dnodes,
00072 EGmemPool_t * mem);
00073
00074
00075 int EGreceiveNetGraph (CC_SFILE * s,
00076 unsigned int *nnodes,
00077 unsigned int *nedges,
00078 unsigned int **edges,
00079 double **weight,
00080 EGmemPool_t * mem);
00081
00082
00083 int EGsendNetGraph (CC_SFILE * s,
00084 unsigned int nnodes,
00085 unsigned int nedges,
00086 unsigned int *edges,
00087 double *weight);
00088
00089
00090 int EGsendRealDomino (CC_SFILE * s,
00091 EGddomino_t * ddom);
00092
00093
00094 int EGreceiveRealDomino (CC_SFILE * s,
00095 EGddomino_t ** ddom,
00096 EGdGraphEdge_t ** dedges,
00097 EGdGraphNode_t ** dnodes,
00098 EGmemPool_t * mem);
00099
00100
00101 int EGsendNetDomino (CC_SFILE * s,
00102 EGnetDdom_t * ddom);
00103
00104
00105 int EGreceiveNetDomino (CC_SFILE * s,
00106 EGnetDdom_t ** ddom,
00107 EGmemPool_t * mem);
00108
00109 int EGisCookGraphConnected (int nnodes,
00110 int nedges,
00111 int *edges,
00112 EGmemPool_t * mem);
00113
00114 #endif