From 8d97e9cab688538e401ac4cb3a178bff66f16b66 Mon Sep 17 00:00:00 2001 From: Aliaume Lopez Date: Tue, 10 Jan 2017 21:14:42 +0100 Subject: [PATCH] Prout prout --- graph.py | 2 ++ new_separation.py | 2 +- parser.py | 2 +- rapport/presentation.tex | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/graph.py b/graph.py index a552513..d8f39f9 100644 --- a/graph.py +++ b/graph.py @@ -40,8 +40,10 @@ class Graph: if weights != None: for i,ligne in enumerate(weights): for j,e in enumerate(ligne): + print ("{:04d} ".format (e), end="") if i != j: self.weights[self.edge_number (i,j)] = e + print ("") logging.debug ("Calculating edges") diff --git a/new_separation.py b/new_separation.py index 96c870f..baec8aa 100644 --- a/new_separation.py +++ b/new_separation.py @@ -372,4 +372,4 @@ def test_separation_on_file (filename): -test_separation_on_file("brazil58") +test_separation_on_file("hk48") diff --git a/parser.py b/parser.py index 2799d83..a3e7034 100644 --- a/parser.py +++ b/parser.py @@ -220,7 +220,7 @@ def read_matrix (tsp, tspfile): elif tsp["EDGE_WEIGHT_FORMAT"] == "UPPER_DIAG_ROW": count_sequence = (N - i for i in range (N)) elif tsp["EDGE_WEIGHT_FORMAT"] == "LOWER_DIAG_ROW": - count_sequence = (i for i in range (N)) + count_sequence = (i + 1 for i in range (N)) else: raise ValueError ("Unkown matrix description") diff --git a/rapport/presentation.tex b/rapport/presentation.tex index c03958d..d13b191 100644 --- a/rapport/presentation.tex +++ b/rapport/presentation.tex @@ -280,10 +280,10 @@ \begin{figure} \centering \subfloat[Optimum du PL($115605$)]{ - \includegraphics[width=5cm]{../images/0CVX_ts225_separationfinie.png} + \includegraphics[width=4.5cm]{../images/0CVX_ts225_separationfinie.png} } \subfloat[Une approximation à $138954$]{ - \includegraphics[width=5cm]{../images/0CVX_ts225_approxPL.png} + \includegraphics[width=4.5cm]{../images/0CVX_ts225_approxPL.png} } \caption{Programme linéaire sur ts225} \end{figure} -- GitLab