Changeset 15 in tspsg-svn for trunk/src/tspmodel.h


Ignore:
Timestamp:
Nov 5, 2007, 1:32:40 AM (17 years ago)
Author:
laleppa
Message:

Finished converting to Qt's model/view architecture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tspmodel.h

    r14 r15  
    11/*
    22 *  TSPSG - TSP Solver and Generator
    3  *  Copyright (C) 2007 L¸ppa <lacontacts[at]gmail[dot]com>
     3 *  Copyright (C) 2007 Lёppa <lacontacts[at]gmail[dot]com>
    44 *
    55 *  $Id$
     
    2525#define TSPMODEL_H
    2626
     27// Decided, that static array with 100 of cities maximum hard limit
     28// will be enough for most cases, but the code will be simplier than
     29// when using dynamic lists. If you need more, just change this value
     30// and recompile the program ;-)
     31#define MAX_CITIES 100
     32// This value means infinity :-)
     33#define INFINITY 1.7E+308
     34// This is string, which represents infinite value in table
     35#define INFSTR "---"
     36
    2737#include <QAbstractTableModel>
    2838
     
    4050        int numCities() const;
    4151        void setNumCities(int);
     52        void randomize();
    4253        int randMin;
    4354        int randMax;
    4455private:
    45         QList<QList<double> *> table;
     56        double table[MAX_CITIES][MAX_CITIES];
    4657        int nCities;
    4758        int rand(int, int);
Note: See TracChangeset for help on using the changeset viewer.