From bd04af6c3509b8b4fe02c30c5c0487aea491a8a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 21 Sep 2020 22:11:59 +0200 Subject: Corrections l3 tsp --- labb3/tsp/src/tsp.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'labb3/tsp/src/tsp.cpp') diff --git a/labb3/tsp/src/tsp.cpp b/labb3/tsp/src/tsp.cpp index 57de067..975e657 100644 --- a/labb3/tsp/src/tsp.cpp +++ b/labb3/tsp/src/tsp.cpp @@ -53,10 +53,11 @@ int main(int argc, char *argv[]) { Point p(x, y); tour.insertSmallest(p); // uncomment the 4 lines below to animate - // tour.draw(scene); - // std::chrono::milliseconds dura(50); - // std::this_thread::sleep_for(dura); - // a.processEvents(); + tour.draw(scene); + std::chrono::milliseconds dura(50); + std::this_thread::sleep_for(dura); + a.processEvents(); + scene->clear(); } input.close(); @@ -64,7 +65,7 @@ int main(int argc, char *argv[]) { cout << "Tour distance: " << std::fixed << std::setprecision(4) << std::showpoint << tour.distance() << endl; cout << "Number of points: " << tour.size() << endl; - tour.show(); + //tour.show(); // draw tour tour.draw(scene); -- cgit v1.2.1