-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
34 lines (26 loc) · 782 Bytes
/
main.cpp
File metadata and controls
34 lines (26 loc) · 782 Bytes
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
#include <cstdio>
#include <fstream>
#include <iostream>
#include "graph-fromjson.hpp"
#include "vf2.hpp"
using namespace std;
int main(int argc, char const* argv[]) {
auto g1 = graphFromJsonFile("../graph-data/graph1.json");
auto g2 = graphFromJsonFile("../graph-data/p6.json");
auto results = Vf2<string>::runV2f(*g1, *g2);
if (results.size() <= 0) {
cout << "no results";
return 0;
}
int cnt = 0;
cout << "graph " << g1->title << " is sub matched graph " << g2->title << endl
<< endl;
for (auto result : results) {
cout << "result:" << ++cnt << endl;
for (auto pr : result) {
cout << " " << pr.first << " -> " << pr.second << endl;
}
cout << endl;
}
return 0;
}