m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-01-03 23:25:15 -0500
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-01-03 23:25:15 -0500
commit8c8ef97f056e268b0d186a218e61e98df1df4733 (patch)
tree4457f1c3a3529c8be274ef3721f2e500138fbb8c
parent9f5d959a3af3582a7b3fa1f7b4b2183c8f73b380 (diff)
Parse args and input
-rw-r--r--CMakeLists.txt4
-rw-r--r--src/brandes.cc12
2 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 44ef223..5d41e17 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,8 @@ set(CMAKE_CXX_FLAGS "-std=c++14")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g")
set(CMAKE_CXX_FLAGS_RELASE "-O3")
-set(SOURCE_FILES src/brandes.cc)
+set(SOURCE_FILES src/brandes.cc
+ src/parse.h
+ src/graph.h)
add_executable(brandes ${SOURCE_FILES})
diff --git a/src/brandes.cc b/src/brandes.cc
index b855750..7c7d529 100644
--- a/src/brandes.cc
+++ b/src/brandes.cc
@@ -1,5 +1,9 @@
+#include <fstream>
#include <iostream>
+#include "parse.h"
+#include "graph.h"
+
int main(int argc, char *argv[]) {
if (argc < 4) {
std::cerr
@@ -8,5 +12,13 @@ int main(int argc, char *argv[]) {
return 1;
}
+ int threads = std::stoi(argv[1]);
+ std::string input_file = argv[2];
+ std::string output_file = argv[3];
+
+ Parser parser(input_file);
+
+ Graph graph = parser.get_graph();
+
return 0;
}