Dip
0.92.4
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
tmp
Dip-0.92.4
Dip
src
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
&);
37
UtilGraphLib
&
operator=
(
const
UtilGraphLib
&);
38
39
public
:
40
UtilGraphLib
() :
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
54
~UtilGraphLib
() {
55
UTIL_DELARR
(
edge_wt
);
56
UTIL_DELARR
(
vertex_wt
);
57
UTIL_DELARR
(
posx
);
58
UTIL_DELARR
(
posy
);
59
UTIL_DELARR
(
coordx
);
60
UTIL_DELARR
(
coordy
);
61
UTIL_DELARR
(
coordz
);
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
UtilGraphLib::read_data
void read_data(const char *datafile)
UtilGraphLib::~UtilGraphLib
~UtilGraphLib()
Definition:
UtilGraphLib.h:54
UtilGraphLib::edge_wt
int * edge_wt
Definition:
UtilGraphLib.h:60
UtilGraphLib
Definition:
UtilGraphLib.h:33
UtilGraphLib::coordx
double * coordx
Definition:
UtilGraphLib.h:63
UtilMacros.h
UtilGraphLib::n_edges
int n_edges
Definition:
UtilGraphLib.h:58
UTIL_DELARR
#define UTIL_DELARR(x)
Definition:
UtilMacros.h:29
UtilGraphLib::capacity
int capacity
Definition:
UtilGraphLib.h:59
UtilGraphLib::n_vertices
int n_vertices
Definition:
UtilGraphLib.h:57
UtilGraphLib::compute_icost
int compute_icost(const int wtype, const int va, const int vb)
UtilGraphLib::name
string name
Definition:
UtilGraphLib.h:51
UtilGraphLib::posx
int * posx
Definition:
UtilGraphLib.h:62
UtilGraphLib::operator=
UtilGraphLib & operator=(const UtilGraphLib &)
UtilGraphLib::coordz
double * coordz
Definition:
UtilGraphLib.h:63
UtilGraphLib::vertex_wt
int * vertex_wt
Definition:
UtilGraphLib.h:61
UtilGraphLib::coordy
double * coordy
Definition:
UtilGraphLib.h:63
UtilGraphLib::posy
int * posy
Definition:
UtilGraphLib.h:62
UtilGraphLib::UtilGraphLib
UtilGraphLib()
Definition:
UtilGraphLib.h:39
Generated by
1.8.5