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
00025
00026
00027 #ifndef UTIL_GRAPHLIB_INCLUDED
00028 #define UTIL_GRAPHLIB_INCLUDED
00029
00030 #include "UtilMacros.h"
00031
00032 #include <string>
00033
00034
00035 class UtilGraphLib {
00036 private:
00037 UtilGraphLib(const UtilGraphLib&);
00038 UtilGraphLib& operator=(const UtilGraphLib&);
00039
00040 public:
00041 UtilGraphLib() :
00042 name (""),
00043 n_vertices(0),
00044 n_edges (0),
00045 capacity (0),
00046 edge_wt (0),
00047 vertex_wt (0),
00048 posx (0),
00049 posy (0),
00050 coordx (0),
00051 coordy (0),
00052 coordz (0) {
00053 };
00054
00055 ~UtilGraphLib() {
00056 UTIL_DELARR(edge_wt);
00057 UTIL_DELARR(vertex_wt);
00058 UTIL_DELARR(posx);
00059 UTIL_DELARR(posy);
00060 UTIL_DELARR(coordx);
00061 UTIL_DELARR(coordy);
00062 UTIL_DELARR(coordz);
00063 };
00064
00065 public:
00066
00067
00068 std::string name;
00069 int n_vertices;
00070 int n_edges;
00071 int capacity;
00072 int* edge_wt;
00073 int* vertex_wt;
00074 int* posx;
00075 int* posy;
00076 double* coordx;
00077 double* coordy;
00078 double* coordz;
00079
00080 public:
00081 void read_data(const char* datafile);
00082 int compute_icost(const int wtype,
00083 const int va,
00084 const int vb);
00085 };
00086
00087 #endif