-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.h
46 lines (35 loc) · 1.05 KB
/
data.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef DATA_H
#define DATA_H
#define INFINITE 99999999
#include <iostream>
#include <string>
#include <fstream>
#include <math.h>
using namespace std;
class Data{
public:
Data( int, char * );
~Data();
void readData();
void printMatrixDist();
inline int getDimension(){ return dimension; };
inline double getDistance(int i, int j){return distMatrix[i][j]; };
inline double **getMatrixCost(){return distMatrix; }
inline double getXCoord(int i){return xCoord[i];}
inline double getYCoord(int i){return yCoord[i];}
inline bool getExplicitCoord(){return explicitCoord; };
string getInstanceName(); //Get instance's name
private:
string instaceName;
int nbOfPar;
int dimension;
double **distMatrix;
double *xCoord, *yCoord;
//Computing Distances
static double CalcDistEuc ( double *, double *, int , int );
static double CalcDistAtt ( double *, double *, int , int );
static double CalcDistGeo ( double *, double *, int , int );
static void CalcLatLong ( double *, double *, int , double *, double* );
bool explicitCoord;
};
#endif