Changeset 87 in tspsg-svn for trunk/src/tspsolver.h
- Timestamp:
- Jan 12, 2010, 3:11:24 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tspsolver.h
r77 r87 1 1 /*! 2 2 * \file tspsolver.h 3 * \author Copyright © 2007-20 09Lёppa <contacts[at]oleksii[dot]name>3 * \author Copyright © 2007-2010 Lёppa <contacts[at]oleksii[dot]name> 4 4 * 5 5 * $Id$ … … 34 34 35 35 //! A matrix of city-to-city travel costs. 36 typedef QList<QList< double> > TMatrix;36 typedef QList<QList<qreal> > TMatrix; 37 37 38 38 /*! … … 60 60 struct SStep { 61 61 TMatrix matrix; //!< This step's matrix 62 doubleprice; //!< The price of travel to this step62 qreal price; //!< The price of travel to this step 63 63 SCandidate candidate; //!< A candiadate for branching in the current matrix 64 64 QList<SCandidate> alts; //!< A list of alternative branching candidates … … 75 75 /*! 76 76 * \brief This class solves Travelling Salesman Problem task. 77 * \author Copyright © 2007-20 09Lёppa <contacts[at]oleksii[dot]name>77 * \author Copyright © 2007-2010 Lёppa <contacts[at]oleksii[dot]name> 78 78 * 79 79 * \todo TODO: Deletion of solution tree on destroy and cleanup. … … 98 98 // QHash<int,int> forbidden; 99 99 100 doublealign(TMatrix &matrix);100 qreal align(TMatrix &matrix); 101 101 void cleanup(); 102 102 void deleteNode(SStep *&node); 103 103 QList<SCandidate> findCandidate(const TMatrix &matrix, int &nRow, int &nCol) const; 104 doublefindMinInCol(int nCol, const TMatrix &matrix, int exr = -1) const;105 doublefindMinInRow(int nRow, const TMatrix &matrix, int exc = -1) const;104 qreal findMinInCol(int nCol, const TMatrix &matrix, int exr = -1) const; 105 qreal findMinInRow(int nRow, const TMatrix &matrix, int exc = -1) const; 106 106 bool hasSubCycles(int nRow, int nCol) const; 107 void subCol(TMatrix &matrix, int nCol, doubleval);108 void subRow(TMatrix &matrix, int nRow, doubleval);107 void subCol(TMatrix &matrix, int nCol, qreal val); 108 void subRow(TMatrix &matrix, int nRow, qreal val); 109 109 }; 110 110
Note: See TracChangeset
for help on using the changeset viewer.