From ff4b56d3bbd9b512a2963288712116d9a2aeeb18 Mon Sep 17 00:00:00 2001 From: mzuenni Date: Fri, 28 Jul 2017 18:32:18 +0200 Subject: fixed last inserted edge --- graph/bitonicTSP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'graph') 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. -- cgit v1.2.3