Changeset 89 in tspsg-svn for trunk/src/tspsolver.h
- Timestamp:
- Jan 12, 2010, 4:27:52 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tspsolver.h
r87 r89 34 34 35 35 //! A matrix of city-to-city travel costs. 36 typedef QList<QList< qreal> > TMatrix;36 typedef QList<QList<double> > TMatrix; 37 37 38 38 /*! … … 60 60 struct SStep { 61 61 TMatrix matrix; //!< This step's matrix 62 qrealprice; //!< The price of travel to this step62 double 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 … … 98 98 // QHash<int,int> forbidden; 99 99 100 qrealalign(TMatrix &matrix);100 double 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 qrealfindMinInCol(int nCol, const TMatrix &matrix, int exr = -1) const;105 qrealfindMinInRow(int nRow, const TMatrix &matrix, int exc = -1) const;104 double findMinInCol(int nCol, const TMatrix &matrix, int exr = -1) const; 105 double 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, qrealval);108 void subRow(TMatrix &matrix, int nRow, qrealval);107 void subCol(TMatrix &matrix, int nCol, double val); 108 void subRow(TMatrix &matrix, int nRow, double val); 109 109 }; 110 110
Note: See TracChangeset
for help on using the changeset viewer.