-
Notifications
You must be signed in to change notification settings - Fork 4
/
auxiliary.h
47 lines (29 loc) · 903 Bytes
/
auxiliary.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
#ifndef TRIANGLES_AUXILIARY_H
#define TRIANGLES_AUXILIARY_H
#include <iostream>
#include <fstream>
#include <map>
#include <vector>
#include <sstream>
#include <string>
#include "constants.h"
using namespace std;
typedef struct {
int a;
int b;
} Edge;
typedef struct {
int id;
vector<int> neighbors;
} Node;
int *seriealizeNode(Node node);
Node deseriealizeNode(int buffer[], int size);
vector<string> split(string str, const char *delimiter);
int node_proc_owner(int boundaries[], int size, int node);
long get_file_size(string fileName);
Edge parse_line(string line, const char *delimiter);
map<int, Node> parse_file(string filename, const char *delimiter);
int *partition_file(string filename, const char *delimiter, int chunks);
int intersectionCount(vector<int> a, vector<int> b);
int surrogateCount(map<int, Node> nodes, Node node);
#endif //TRIANGLES_AUXILIARY_H