File: mcl2mtx.cpp

package info (click to toggle)
combblas 2.0.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 190,476 kB
  • sloc: cpp: 55,912; ansic: 25,134; sh: 3,691; makefile: 548; csh: 66; python: 49; perl: 21
file content (36 lines) | stat: -rw-r--r-- 756 bytes parent folder | download
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
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <chrono>
#include <functional>
#include <cmath>
#include <map>
#include <tuple>
#include <cstdlib>
#include <cstdio>
#include <limits>
#include "MMConverter.h"

using namespace std;
#define COMPRESS_STRING

int main(int argc, char* argv[])
{
    if(argc < 3)
    {
        cout << "Usage: ./mcl2mtx <full_path_to_input> <outputprefix>" << endl;
        return 0;
    }
    
    cout << "reading input matrix in MCL format... " << endl;
    
    string dictname = "Vertex_Dict_";
    dictname += string(argv[2]);
    ofstream dictout(dictname);
    
    MMConverter(string(argv[1]), dictout, string(argv[2]));
    dictout.close();
}