Changeset fcaa74f7d7 in tspsg for src/tspsolver.h


Ignore:
Timestamp:
Dec 16, 2009, 11:49:51 PM (14 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
140109febb
Parents:
0bd0e1aca7
Message:
  • TCandidate should, actually, be SCandidate (struct, not typedef). Renamed it.
  • Documentation update.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tspsolver.h

    r0bd0e1aca7 rfcaa74f7d7  
    66 *  $URL$
    77 *
    8  * \brief Defines #tMatrix typedef, sStep struct and CTSPSolver class.
     8 * \brief Defines #TMatrix typedef, SCandidate and SStep structs and CTSPSolver class.
    99 *
    1010 *  <b>TSPSG: TSP Solver and Generator</b>
     
    3939 * \brief A structure that represents a candidate for branching.
    4040 */
    41 struct TCandidate {
     41struct SCandidate {
    4242        int nRow; //!< A zero-based row number of the candidate
    4343        int nCol; //!< A zero-based column number of the candidate
    4444
    4545        //! Assigns default values
    46         TCandidate() {
     46        SCandidate() {
    4747                nCol = nRow = -1;
    4848        }
    4949        //! An operator == implementation
    50         bool operator ==(const TCandidate &cand) const {
     50        bool operator ==(const SCandidate &cand) const {
    5151                return ((cand.nRow == nRow) && (cand.nCol == nCol));
    5252        }
     
    6161        TMatrix matrix; //!< This step's matrix
    6262        double price; //!< The price of travel to this step
    63         TCandidate candidate; //!< A candiadate for branching in the current matrix
    64         QList<TCandidate> alts; //!< A list of alternative branching candidates
     63        SCandidate candidate; //!< A candiadate for branching in the current matrix
     64        QList<SCandidate> alts; //!< A list of alternative branching candidates
    6565        SStep *plNode; //!< Pointer to the left branch step
    6666        SStep *prNode; //!< Pointer to the right branch step
     
    101101        void cleanup();
    102102        void deleteNode(SStep *node);
    103         QList<TCandidate> findCandidate(const TMatrix &matrix, int &nRow, int &nCol) const;
     103        QList<SCandidate> findCandidate(const TMatrix &matrix, int &nRow, int &nCol) const;
    104104        double findMinInCol(int nCol, const TMatrix &matrix, int exr = -1) const;
    105105        double findMinInRow(int nRow, const TMatrix &matrix, int exc = -1) const;
Note: See TracChangeset for help on using the changeset viewer.