Dip  0.92.4
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 // Authors: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com) //
8 // Ted Ralphs, Lehigh University (ted@lehigh.edu) //
9 // Jiadong Wang, Lehigh University (jiw408@lehigh.edu) //
10 // //
11 // Copyright (C) 2002-2019, Lehigh University, Matthew Galati, Ted Ralphs //
12 // All Rights Reserved. //
13 //===========================================================================//
14 
15 /*
16  Author : Matthew Galati
17  Date : 02/20/03
18  Purpose : A class for storing data instances from TSPLIB and VRPLIB.
19 
20  02/20/03: Initial version for VRPLIB
21  TODO : TSPLIB
22  : apply to KCCP code
23 */
24 
25 
26 #ifndef UTIL_GRAPHLIB_INCLUDED
27 #define UTIL_GRAPHLIB_INCLUDED
28 
29 #include "UtilMacros.h"
30 
31 #include <string>
32 
33 // ----------------------------------------------------------------------- //
34 class UtilGraphLib {
35 private:
36  UtilGraphLib(const UtilGraphLib&);
38 
39 public:
41  name (""),
42  n_vertices(0),
43  n_edges (0),
44  capacity (0),
45  edge_wt (0),
46  vertex_wt (0),
47  posx (0),
48  posy (0),
49  coordx (0),
50  coordy (0),
51  coordz (0) {
52  };
53 
62  };
63 
64 public:
65  //TODO: make these private and provide access functions?
66  //TSPLIB/VRPLIB
67  std::string name;
68  int n_vertices;
69  int n_edges;
70  int capacity;
71  int* edge_wt;
72  int* vertex_wt;
73  int* posx;
74  int* posy;
75  double* coordx;
76  double* coordy;
77  double* coordz;
78 
79 public:
80  void read_data(const char* datafile);
81  int compute_icost(const int wtype,
82  const int va,
83  const int vb);
84 };
85 
86 #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