From 06d89afc7a9b4f130e2ec928d73b63ccf55b6f88 Mon Sep 17 00:00:00 2001
From: Florian <florian.heinrichs@informatik.hu-berlin.de>
Date: Tue, 30 Apr 2019 11:50:55 +0200
Subject: [PATCH] command line argument as file path now

---
 bnb/main.cpp | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/bnb/main.cpp b/bnb/main.cpp
index e6cb7df..0870d5f 100755
--- a/bnb/main.cpp
+++ b/bnb/main.cpp
@@ -6,12 +6,24 @@
 #include <gp-bnb/partition.hpp>
 #include <gp-bnb/metis_reader.hpp>
 
-int main() {
+int main(int argc, char** argv) {
 
-    // MetisReader example
-    std::string graphFile = "../test/inputs/delaunay_n10.graph";
+    std::string graphFile = argv[1];
     auto g = metis_reader().read(graphFile);
 
-    std::cout << "Number of nodes: " << g.num_nodes() << std::endl;
+    std::cerr << "Number of nodes: " << g.num_nodes() << std::endl;
+
+    auto sol = gp_bnb::solver(g);
+    sol.solve();
+
+    /*
+    int i = 1;
+    for(auto g : sol.best_solution()){
+        
+        std::cerr << i++ << ": " << g << std::endl;
+
+    }
+    */
+
 }
 
-- 
GitLab