-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathgraph_io_helper.h
More file actions
25 lines (20 loc) · 1.04 KB
/
graph_io_helper.h
File metadata and controls
25 lines (20 loc) · 1.04 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
#include <vector>
#include <map>
#include "io_helper.h"
using namespace std;
/**
*@fn void ChangeDelimiter ( const string& filein, const string& fileout, const char& new_delim )
*
* Changes the network file from being delimited by a pipe (|) to delimited by the given character.
* All instances of the given character in the original network are also replaced by a pipe.
* The result is more of a switch between the pipe character and the new delimiter character.
*
* @param filein File that holds the network information
* @param fileout File to write new format to
* @param new_delim Delimiter to change to
*/
void ChangeDelimiter(const string &filein, const string &fileout, const char &old_delim, const char &new_delim);
void EncodeNetwork(const string &filein, const string &fileout, const char &old_delim, const char &new_delim,
vector<string> &lookup);
void DecodeCommunities(const string &filein, const string &fileout, const char &old_delim, const char &new_delim,
const vector<string> &lookup);