UtilGraphLib.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef UTIL_GRAPHLIB_INCLUDED
00025 #define UTIL_GRAPHLIB_INCLUDED
00026
00027 #include "UtilMacros.h"
00028
00029 #include <string>
00030 using namespace std;
00031
00032
00033 class UtilGraphLib {
00034 private:
00035 UtilGraphLib(const UtilGraphLib&);
00036 UtilGraphLib& operator=(const UtilGraphLib&);
00037
00038 public:
00039 UtilGraphLib()
00040 : name(""), n_vertices(0), n_edges(0), capacity(0), edge_wt(0),
00041 vertex_wt(0), posx(0), posy(0),
00042 coordx(0), coordy(0), coordz(0) {};
00043 ~UtilGraphLib() {
00044 UTIL_DELARR(edge_wt);
00045 UTIL_DELARR(vertex_wt);
00046 UTIL_DELARR(posx);
00047 UTIL_DELARR(posy);
00048 UTIL_DELARR(coordx);
00049 UTIL_DELARR(coordy);
00050 UTIL_DELARR(coordz);
00051 };
00052
00053 public:
00054
00055
00056 string name;
00057 int n_vertices;
00058 int n_edges;
00059 int capacity;
00060 int* edge_wt;
00061 int* vertex_wt;
00062 int* posx, *posy;
00063 double* coordx, *coordy, *coordz;
00064
00065 public:
00066 void read_data(const char* datafile);
00067 int compute_icost(const int wtype, const int va, const int vb);
00068 };
00069
00070 #endif