-
Notifications
You must be signed in to change notification settings - Fork 3
/
connections.hpp
49 lines (44 loc) · 1.22 KB
/
connections.hpp
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
47
48
49
#pragma once
#include <vector>
namespace marxan {
using namespace std;
typedef struct scost
{
double total;
int pus;
double connection;
int missing;
double penalty;
double cost;
double threshpen;
double shortfall;
double probability1D;
double probability2D;
scost():
total(0.0),
pus(0),
connection(0.0),
missing(0),
penalty(0.0),
cost(0.0),
threshpen(0.0),
shortfall(0.0),
probability1D(0.0),
probability2D(0.0)
{}
} scost;
/* Connectivity Structure. Fixed connectivity number.*/
typedef struct sneighbour
{
int nbr; // puid of neighbour
double cost;
int connectionorigon; // for asymmetric connections, whether connection starts from this node.
sneighbour(int nbr, double cost, int connectionorigon) { this->nbr = nbr; this->cost = cost; this->connectionorigon = connectionorigon; }
} sneighbour;
typedef struct sconnections
{
vector<sneighbour> first;
double fixedcost;
int nbrno;
} sconnections;
} // namespace marxan