Dip-All  0.91.0
UtilGraphLib.h
Go to the documentation of this file.
1 //===========================================================================//
2 // This file is part of the DIP Solver Framework. //
3 // //
4 // DIP is distributed under the Eclipse Public License as part of the //
5 // COIN-OR repository (http://www.coin-or.org). //
6 // //
7 // Author: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com) //
8 // //
9 // Conceptual Design: Matthew Galati, SAS Institute Inc. //
10 // Ted Ralphs, Lehigh University //
11 // //
12 // Copyright (C) 2002-2015, Lehigh University, Matthew Galati, Ted Ralphs //
13 // All Rights Reserved. //
14 //===========================================================================//
15 
16 /*
17  Author : Matthew Galati
18  Date : 02/20/03
19  Purpose : A class for storing data instances from TSPLIB and VRPLIB.
20 
21  02/20/03: Initial version for VRPLIB
22  TODO : TSPLIB
23  : apply to KCCP code
24 */
25 
26 
27 #ifndef UTIL_GRAPHLIB_INCLUDED
28 #define UTIL_GRAPHLIB_INCLUDED
29 
30 #include "UtilMacros.h"
31 
32 #include <string>
33 
34 // ----------------------------------------------------------------------- //
35 class UtilGraphLib {
36 private:
37  UtilGraphLib(const UtilGraphLib&);
39 
40 public:
42  name (""),
43  n_vertices(0),
44  n_edges (0),
45  capacity (0),
46  edge_wt (0),
47  vertex_wt (0),
48  posx (0),
49  posy (0),
50  coordx (0),
51  coordy (0),
52  coordz (0) {
53  };
54 
63  };
64 
65 public:
66  //TODO: make these private and provide access functions?
67  //TSPLIB/VRPLIB
68  std::string name;
69  int n_vertices;
70  int n_edges;
71  int capacity;
72  int* edge_wt;
73  int* vertex_wt;
74  int* posx;
75  int* posy;
76  double* coordx;
77  double* coordy;
78  double* coordz;
79 
80 public:
81  void read_data(const char* datafile);
82  int compute_icost(const int wtype,
83  const int va,
84  const int vb);
85 };
86 
87 #endif
void read_data(const char *datafile)
double * coordx
Definition: UtilGraphLib.h:63
#define UTIL_DELARR(x)
Definition: UtilMacros.h:29
int compute_icost(const int wtype, const int va, const int vb)
UtilGraphLib & operator=(const UtilGraphLib &)
double * coordz
Definition: UtilGraphLib.h:63
int * vertex_wt
Definition: UtilGraphLib.h:61
double * coordy
Definition: UtilGraphLib.h:63