-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathparse.h
37 lines (32 loc) · 904 Bytes
/
parse.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
#pragma once
#include <iostream>
#include <fstream>
#include <map>
#include <string>
#include <set>
#include <vector>
#include <cstdlib>
#include <boost/algorithm/string.hpp>
#include <boost/bimap.hpp>
class graph
{
public:
graph() : R(NULL), C(NULL), F(NULL), n(-1), m(-1) {}
void print_adjacency_list();
void print_BC_scores(const std::vector<float> bc, char *outfile);
void print_CSR();
void print_R();
void print_high_degree_vertices();
void print_numerical_edge_file(char *outfile);
void print_number_of_isolated_vertices();
int *R;
int *C;
int *F;
int n; //Number of vertices
int m; //Number of edges
boost::bimap<unsigned,std::string> IDs; //Associate vertices with other data. In general the unsigned could be replaced with a struct of attributes.
};
graph parse(char *file);
graph parse_metis(char *file);
//graph parse_snap(char *file);
graph parse_edgelist(char *file);