Changeset 2bc8e278b7 in tspsg for src/tspsolver.cpp


Ignore:
Timestamp:
Nov 5, 2007, 1:32:40 AM (17 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
bcfd415fe2
Parents:
2f915f19f2
Message:

Finished converting to Qt's model/view architecture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tspsolver.cpp

    r2f915f19f2 r2bc8e278b7  
    2323
    2424#include "tspsolver.h"
     25#include "tspmodel.h"
    2526
    2627CTSPSolver::CTSPSolver()
     
    3031double CTSPSolver::findMinInRow(int nRow, tMatrix matrix)
    3132{
    32 double min = infinity;
     33double min = INFINITY;
    3334        for (int k = 0; k < nCities; k++)
    3435                if (min > matrix[nRow][k])
    3536                        min = matrix[nRow][k];
    36         return min == infinity ? 0 : min;
     37        return min == INFINITY ? 0 : min;
    3738}
    3839
    3940double CTSPSolver::findMinInCol(int nCol, tMatrix matrix)
    4041{
    41 double min = infinity;
     42double min = INFINITY;
    4243        for (int k = 0; k < nCities; k++)
    4344                if (min > matrix[k][nCol])
    4445                        min = matrix[k][nCol];
    45         return min == infinity ? 0 : min;
     46        return min == INFINITY ? 0 : min;
    4647}
    4748
Note: See TracChangeset for help on using the changeset viewer.