Changeset e0fcac5f2c in tspsg for src/tspsolver.h
- Timestamp:
- Oct 24, 2009, 3:37:48 PM (15 years ago)
- Branches:
- 0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
- Children:
- 8af59c4aa3
- Parents:
- 85ad815b0b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tspsolver.h
r85ad815b0b re0fcac5f2c 1 1 /*! 2 * \ class CTSPSolver2 * \file tspsolver.h 3 3 * \author Copyright © 2007-2009 Lёppa <contacts[at]oleksii[dot]name> 4 * \brief This class solves Travelling Salesman Problem task.5 4 * 6 5 * $Id$ 7 6 * $URL$ 7 * 8 * \brief Defines #tMatrix typedef, sStep struct and CTSPSolver class. 8 9 * 9 10 * <b>TSPSG: TSP Solver and Generator</b> … … 23 24 * You should have received a copy of the GNU General Public License 24 25 * along with TSPSG. If not, see <http://www.gnu.org/licenses/>. 25 *26 * \todo TODO: Deletion of solution tree on destroy and cleanup.27 26 */ 28 27 29 28 #ifndef TSPSOLVER_H 30 29 #define TSPSOLVER_H 31 32 /*!33 * \file tspsolver.h34 * \brief Defines #tMatrix typedef, sStep struct and CTSPSolver class.35 */36 30 37 31 #include "globals.h" … … 67 61 }; 68 62 63 /*! 64 * \brief This class solves Travelling Salesman Problem task. 65 * \author Copyright © 2007-2009 Lёppa <contacts[at]oleksii[dot]name> 66 * 67 * \todo TODO: Deletion of solution tree on destroy and cleanup. 68 */ 69 69 class CTSPSolver 70 70 { … … 74 74 CTSPSolver(); 75 75 QString getSortedPath() const; 76 static QString getVersionId(); 76 77 bool isOptimal() const; 77 78 sStep *solve(int, tMatrix, QWidget *parent = 0); 78 static QString getVersionId();79 79 80 80 private: … … 84 84 QHash<int,int> route; 85 85 // QHash<int,int> forbidden; 86 86 87 double align(tMatrix &); 87 88 void cleanup(); 88 89 bool findCandidate(tMatrix, int &, int &); 90 double findMinInCol(int, tMatrix, int exr = -1); 89 91 double findMinInRow(int, tMatrix, int exc = -1); 90 double findMinInCol(int, tMatrix, int exr = -1);91 92 bool hasSubCycles(int, int); 92 93 void subCol(tMatrix &, int, double);
Note: See TracChangeset
for help on using the changeset viewer.