From 403ce5391e0fecc51bf50c86070ebc0e6d7e05af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 17 Aug 2020 19:34:09 +0200 Subject: add tsp code --- labb3/tsp/src/Tour.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 labb3/tsp/src/Tour.h (limited to 'labb3/tsp/src/Tour.h') diff --git a/labb3/tsp/src/Tour.h b/labb3/tsp/src/Tour.h new file mode 100644 index 0000000..6e4622f --- /dev/null +++ b/labb3/tsp/src/Tour.h @@ -0,0 +1,22 @@ +#ifndef TOUR_H +#define TOUR_H + +#include "Node.h" +#include "Point.h" + +class Tour { +public: + Tour(); + ~Tour(); + void show() const; + void draw(QGraphicsScene* scene) const; + int size() const; + double distance() const; + void insertNearest(Point p); + void insertSmallest(Point p); + +private: + Node *first; +}; + +#endif // TOUR_H -- cgit v1.2.1