Dip
0.92.4
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
tmp
Dip-0.92.4
Dip
src
old
UtilGraphLib.h
Go to the documentation of this file.
1
//===========================================================================//
2
// This file is part of the Decomp Solver Framework. //
3
// //
4
// Decomp is distributed under the Common 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
// Copyright (C) 2002-2007, Lehigh University, Matthew Galati, and Ted Ralphs//
10
// All Rights Reserved. //
11
//===========================================================================//
12
13
/*
14
Author : Matthew Galati
15
Date : 02/20/03
16
Purpose : A class for storing data instances from TSPLIB and VRPLIB.
17
18
02/20/03: Initial version for VRPLIB
19
TODO : TSPLIB
20
: apply to KCCP code
21
*/
22
23
24
#ifndef UTIL_GRAPHLIB_INCLUDED
25
#define UTIL_GRAPHLIB_INCLUDED
26
27
#include "
UtilMacros.h
"
28
29
#include <string>
30
using namespace
std;
31
32
// ----------------------------------------------------------------------- //
33
class
UtilGraphLib
{
34
private
:
35
UtilGraphLib
(
const
UtilGraphLib
&);
36
UtilGraphLib
& operator=(
const
UtilGraphLib
&);
37
38
public
:
39
UtilGraphLib
()
40
: name(
""
), n_vertices(0), n_edges(0), capacity(0), edge_wt(0),
41
vertex_wt(0), posx(0), posy(0),
42
coordx(0), coordy(0), coordz(0) {};
43
~UtilGraphLib
() {
44
UTIL_DELARR
(edge_wt);
45
UTIL_DELARR
(vertex_wt);
46
UTIL_DELARR
(posx);
47
UTIL_DELARR
(posy);
48
UTIL_DELARR
(coordx);
49
UTIL_DELARR
(coordy);
50
UTIL_DELARR
(coordz);
51
};
52
53
public
:
54
//TODO: make these private and provide access functions?
55
//TSPLIB/VRPLIB
56
string
name;
57
int
n_vertices
;
58
int
n_edges
;
59
int
capacity
;
60
int
*
edge_wt
;
61
int
*
vertex_wt
;
62
int
* posx, *
posy
;
63
double
* coordx, *coordy, *
coordz
;
64
65
public
:
66
void
read_data(
const
char
* datafile);
67
int
compute_icost(
const
int
wtype,
const
int
va,
const
int
vb);
68
};
69
70
#endif
UtilGraphLib::~UtilGraphLib
~UtilGraphLib()
Definition:
UtilGraphLib.h:43
UtilGraphLib::edge_wt
int * edge_wt
Definition:
UtilGraphLib.h:60
UtilGraphLib
Definition:
UtilGraphLib.h:33
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
UtilMacros.h
UtilGraphLib::n_vertices
int n_vertices
Definition:
UtilGraphLib.h:57
UtilGraphLib::coordz
double * coordz
Definition:
UtilGraphLib.h:63
UtilGraphLib::vertex_wt
int * vertex_wt
Definition:
UtilGraphLib.h:61
UtilGraphLib::posy
int * posy
Definition:
UtilGraphLib.h:62
UtilGraphLib::UtilGraphLib
UtilGraphLib()
Definition:
UtilGraphLib.h:39
Generated by
1.8.5