Changeset e664262f7d in tspsg for src/tspsolver.h


Ignore:
Timestamp:
Oct 21, 2007, 3:07:21 PM (17 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
2f915f19f2
Parents:
67e53c96d7
Message:

Writing solving algorithm...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tspsolver.h

    r67e53c96d7 re664262f7d  
    2929const double infinity = 1.7E+308;
    3030
     31typedef QList<double *> tMatrix;
     32
    3133// Structure represent one step of solving
    3234// The tree of such elements will represent the solving process
    3335struct sStep {
    34         double *matrix;
     36        tMatrix matrix;
    3537        double price;
    3638        struct {unsigned int x; unsigned int y;} pos;
    37         sStep *pLeft, *pRight;
    38         sStep() { matrix = NULL; price = pos.x = pos.y = 0; pLeft = pRight = NULL;}
     39        sStep *plNode, *prNode;
     40        sStep() { price = pos.x = pos.y = 0; plNode = prNode = NULL; }
    3941};
    4042
     
    4446public:
    4547        CTSPSolver();
    46         sStep *solve(int, double *);
     48        sStep *solve(int, tMatrix);
     49private:
     50        int nCities;
     51        sStep *root;
     52        double findMinInRow(int, tMatrix);
     53        double findMinInCol(int, tMatrix);
    4754};
    4855
Note: See TracChangeset for help on using the changeset viewer.