Commit f09f7012 authored by Gaetan D's avatar Gaetan D

Merge branch 'master' of gitlab.crans.org:alopez/projet-optimisation

parents 043555c2 05c578f7
......@@ -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")
......
......@@ -216,11 +216,11 @@ def read_matrix (tsp, tspfile):
elif tsp["EDGE_WEIGHT_FORMAT"] == "FULL_MATRIX":
count_sequence = (N for i in range (N))
elif tsp["EDGE_WEIGHT_FORMAT"] == "LOWER_ROW":
count_sequence = (i - 1 for i in range (N))
count_sequence = (i for i in range (N))
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")
......
......@@ -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}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment