Changeset 6dfdef0c3e in tspsg for src/tspsolver.cpp


Ignore:
Timestamp:
Aug 11, 2009, 6:54:01 PM (15 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
281303f1f7
Parents:
c10297cf73
Message:

+ PDF format option when saving solution if platform supports printing.

  • Check alternative candidates for subcycles.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tspsolver.cpp

    rc10297cf73 r6dfdef0c3e  
    9797        for (int r = 0; r < nCities; r++)
    9898                for (int c = 0; c < nCities; c++)
    99 //                      if ((matrix[r][c] == 0) && !forbidden.values(r).contains(c)) {
     99//                      if ((matrix.at(r).at(c) == 0) && !forbidden.values(r).contains(c)) {
    100100                        if (matrix.at(r).at(c) == 0) {
    101101                                sum = findMinInRow(r,matrix,c) + findMinInCol(c,matrix,r);
     
    105105                                        nCol = c;
    106106                                        alts = false;
    107                                 } else if (sum == h)
     107                                } else if ((sum == h) && !hasSubCycles(r,c))
    108108                                        alts = true;
    109109                        }
Note: See TracChangeset for help on using the changeset viewer.