Dip 0.95.0
Loading...
Searching...
No Matches
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// ----------------------------------------------------------------------- //
35private:
37 UtilGraphLib& operator=(const UtilGraphLib&);
38
39public:
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
64public:
65 //TODO: make these private and provide access functions?
66 //TSPLIB/VRPLIB
67 std::string name;
71 int* edge_wt;
73 int* posx;
74 int* posy;
75 double* coordx;
76 double* coordy;
77 double* coordz;
78
79public:
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
#define UTIL_DELARR(x)
Definition: UtilMacros.h:65
int * vertex_wt
Definition: UtilGraphLib.h:72
int compute_icost(const int wtype, const int va, const int vb)
double * coordz
Definition: UtilGraphLib.h:77
void read_data(const char *datafile)
double * coordy
Definition: UtilGraphLib.h:76
std::string name
Definition: UtilGraphLib.h:67
double * coordx
Definition: UtilGraphLib.h:75