MyThread.cpp
Go to the documentation of this file.
1 //==================================================================
2 // File : mythread.h
3 // Author : rsagalyn
4 // Date : Aug 25, 2013
5 // Description : Subclass of threads.h, implements run()
6 //==================================================================
7 
8 #include "MyThread.h"
9 
11 {
12  int result = mytsp->find_best_path(start_node);
13 
15  mytsp->path_vals[my_id][1] = result;
16 
17  if (DEBUG) cout << "thread " << setw(4) << left << my_id << setw(8) << left
18  << " result: " << setw(5) << left << result << endl;
19 
20  pthread_exit(NULL);
21 }
int find_best_path(int)
Definition: tsp.cpp:630
#define DEBUG
Definition: tsp.h:41
int my_id
Definition: threads.h:67
TSP * mytsp
Definition: threads.h:64
int start_node
Definition: threads.h:61
virtual void run()
Definition: MyThread.cpp:10
double ** path_vals
Definition: tsp.h:119


co_scan
Author(s):
autogenerated on Mon Feb 28 2022 23:00:45