Compare commits

..

1 Commits

Author SHA1 Message Date
ca5d4a938e E3 2024-09-06 16:16:29 +02:00

View File

@ -46,7 +46,6 @@ int main(int argc, char *argv[]) {
Tour tour;
double x;
double y;
auto timeStart = std::chrono::high_resolution_clock::now();
while (input >> x >> y) {
Point p(x, y);
tour.insertSmallest(p);
@ -57,14 +56,12 @@ int main(int argc, char *argv[]) {
//a.processEvents();
}
input.close();
auto took = std::chrono::high_resolution_clock::now() - timeStart;
// print tour to standard output
cout << "Tour distance: " << std::fixed << std::setprecision(4)
<< std::showpoint << tour.distance() << endl;
cout << "Number of points: " << tour.size() << endl;
tour.show();
cout << "Calculation took: " << took.count()*1E-6 << "ms" << endl;
// draw tour
tour.draw(scene);