-
Notifications
You must be signed in to change notification settings - Fork 3
/
global.h
90 lines (68 loc) · 1.91 KB
/
global.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef __GLOBAL_H_
#define __GLOBAL_H_
#include <iostream>
#include <fstream>
#include <string>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <memory.h>
#include <vector>
#include <windows.h>
#include <iomanip>
using namespace std;
#define GNEx_nodes 128
#define GNEx_edge 1024
#define GNEx_QR 1.0/(2*GNEx_edge)
#define INF 1.0e+30
#define archive_size 500 /* set capacity of archive */
// demensionality of variables and objectives
int numVariables;
int numObjectives;
int popsize;
char strFunctionType[256];
char FileName[256];
char FilePath[256];
char NetworkName[256];
char NetworkLabel[256];
char LabelName[256];
// ideal point used in decomposition methods
double *idealpoint;
double *nadirpoint;
// parameters for random number generation
int seed = 237;
long rnd_uni_init;
int optimization; /* set optimization type, 0 for min, 1 for max */
double alpha = 1.0;
double r = 1.0;
double delta = 2.0;
const double perterbation = 0.00001;
double mutate_posibility ;
const double cross_posibility = 0.9;
vector<vector<double> >front; // store removed PF
vector<vector<int> >chrom; // store the corresponding chrom
vector<double> NMI;
vector<double> pm_NMI;
vector<double> pm_modularity;
vector<double> Thirty_Run_NMI;
vector<double> Thirty_Run_modularity;
vector<int> clusters;
double NMIavg;
double NMImax;
double Qmax;
double Qavg;
int SignedFlag; //1 for signed networks, 0 for unsigned networks
vector<double> modularity;
unsigned int nondomCtr = 0; /* number of nondominated solutions in archive */
struct network
{
vector<int> neighbours; //positive neighbors
vector<int> neighbours_n; //negative neighbors
int degree; //positive links
int degree_n; //negative links
};
int **AdjacentMatrix ;
network *node ;
#include "random.h"
#endif