-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraph.h
69 lines (62 loc) · 1.62 KB
/
graph.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
#include "common.h"
using namespace std::placeholders;
#ifndef GRAD_GRAPH_H
#define GRAD_GRAPH_H
#define FILTER_BASED_ON_DEGREE_THRESHOLD 0.4
#define FILTER_BASED_ON_EDGE_THRESHOLD 0.4
class Graph
{
public:
int lb = 0;
int nodes;
double coloringThreshold = 0.1;
bool matrixFlag = false;
bool matrixFirstTime;
vector<bool> changeFlag[2];
vector<node> g;
vector<bool> live;
vector<int> coreNumber;
vector<int> orders;
vector<int> d;
int maxD;
vector<vector<bool>> matrix;
int matrixSize;
int matrixFirstLivePointer;
vector<int> matrixc2r;
vector<int> matrixr2c;
vector<int> levels;
void init(int vNum);
void setLowerBound(int limit){lb = limit;};
void createNode(int n, set<int> r) {
g[n] = r;
}
void createConnection(int n1_, int n2_)
{
g[n1_].insert(n2_);
g[n2_].insert(n1_);
}
void print();
bool filterBasedOnDegree();
bool filterBasedOnDegree_(int recorder);
bool filterBasedOnDegreeLastSum;
bool filterBasedOnEdge(bool special = false);
bool filterBasedOnEdge_(int recorder);
bool filterBasedOnEdgeLastSum;
void filterBasedOnKcore();
void filterMixed();
void filterMixed_();
void filterBasedOnKcore2();
bool KcoreDegreesComp(int, int);
vector<int> degrees;
void islandTest();
int kcoreMini();
void deleteNode(int);
void deleteNode_(int, int);
void kill();
void maximalClique(vector<int> &t);
void matrixConvert();
void matrixConvert(vector<int> &P);
void basicInfo();
//void quickSort(vector<int> &, int, int);
};
#endif