diff options
Diffstat (limited to 'labb3/tsp/src/Tour.h')
| -rw-r--r-- | labb3/tsp/src/Tour.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/labb3/tsp/src/Tour.h b/labb3/tsp/src/Tour.h index 5262792..bb5166b 100644 --- a/labb3/tsp/src/Tour.h +++ b/labb3/tsp/src/Tour.h @@ -1,9 +1,9 @@ -// This is the .h file you will edit and turn in. -// We have provided a skeleton for you, -// but you must finish it as described in the spec. -// Also remove these comments here and add your own, as well as on the members. -// TODO: remove this comment header - +/* + * TDDD86 Lab 3b - gusso230 (group 11) + * This file contains the tour structure. + * You can insert points using two algorithms (nearest neighbour and smallest + * increase), get the total length of the tour and draw the tour. + */ #ifndef TOUR_H #define TOUR_H @@ -12,18 +12,17 @@ class Tour { public: - - Tour(); - ~Tour(); - void show(); - void draw(QGraphicsScene* scene); - int size(); - double distance(); - void insertNearest(Point p); - void insertSmallest(Point p); + Tour(); // create an empty tour + ~Tour(); // free all nodes + void show() const; // print the tour to stdout + void draw(QGraphicsScene *scene) const; // draw the tour on `scene` + int size() const; // return number of points on tour + double distance() const; // return total distance of tour + void insertNearest(Point p); // insert `p` using nearestNeighbour + void insertSmallest(Point p); // insert `p` using insertSmallest private: - + Node *first; // first node }; #endif // TOUR_H |
