-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathlayered_flow.cpp
More file actions
38 lines (36 loc) · 1.18 KB
/
layered_flow.cpp
File metadata and controls
38 lines (36 loc) · 1.18 KB
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
#include "common.hpp"
#include "community.hpp"
#include "file_io.hpp"
#include "network.hpp"
#include <iostream>
int main(int argc, char **argv) {
int num_comms = 3;
int triple_type = D3CS_RECIP;
int cut_type = D3C_COND_RECIP;
std::string name = "layered_flow";
std::cout << "DIRLAP ---------" << std::endl;
{
Network net = Network("data", name, triple_type);
CommDetection comm(net, num_comms, DIRLAP, cut_type, name);
comm.Run();
std::vector<int> comms = comm.Communities();
WriteVector(comms, "layered_flow_dl_comms.txt");
}
std::cout << "D3C ONLY RECIP ---------" << std::endl;
{
Network net = Network("data", name, triple_type);
CommDetection comm(net, num_comms, D3C_ONLY_RECIP_DIRLAP, cut_type, name);
comm.Run();
std::vector<int> comms = comm.Communities();
WriteVector(comms, "layered_flow_subdl_comms.txt");
}
std::cout << "TENSOR ---------" << std::endl;
{
Network net = Network("data", name, triple_type);
CommDetection comm(net, num_comms, TENSOR, cut_type, name);
comm.Run();
std::vector<int> comms = comm.Communities();
WriteVector(comms, "layered_flow_tsc_comms.txt");
}
std::cout << "END ---------" << std::endl;
}