Dip-All
0.91.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
home
coin
svn-release
Dip-0.91.6
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
// 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
&);
38
UtilGraphLib
&
operator=
(
const
UtilGraphLib
&);
39
40
public
:
41
UtilGraphLib
() :
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
55
~UtilGraphLib
() {
56
UTIL_DELARR
(
edge_wt
);
57
UTIL_DELARR
(
vertex_wt
);
58
UTIL_DELARR
(
posx
);
59
UTIL_DELARR
(
posy
);
60
UTIL_DELARR
(
coordx
);
61
UTIL_DELARR
(
coordy
);
62
UTIL_DELARR
(
coordz
);
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
UtilGraphLib::read_data
void read_data(const char *datafile)
UtilGraphLib::~UtilGraphLib
~UtilGraphLib()
Definition:
UtilGraphLib.h:55
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