summaryrefslogtreecommitdiff
path: root/graph
diff options
context:
space:
mode:
authormzuenni <mzuenni@users.noreply.github.com>2017-07-28 18:32:18 +0200
committerGitHub <noreply@github.com>2017-07-28 18:32:18 +0200
commitff4b56d3bbd9b512a2963288712116d9a2aeeb18 (patch)
tree23b95d291a246bf14a04cac95fc500327de5587e /graph
parent1f86a9097bb05c227dfc11a6739a4970d7b42360 (diff)
fixed last inserted edge
Diffstat (limited to 'graph')
-rw-r--r--graph/bitonicTSP.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/graph/bitonicTSP.cpp b/graph/bitonicTSP.cpp
index 478362d..babddbd 100644
--- a/graph/bitonicTSP.cpp
+++ b/graph/bitonicTSP.cpp
@@ -28,7 +28,7 @@ void bitonicTSP() {
}
n = j + 1;
} while(j != 0);
- lt.push_back(0);
+ (lt.back() == 1 ? lt : ut).push_back(0);
reverse(lt.begin(), lt.end());
lt.insert(lt.end(), ut.begin(), ut.end());
//return lt;// Enthält Knoten 0 zweimal. An erster und letzter Position.