annotate engine/core/pathfinder/routepather/routepathersearch.h @ 293:66df2422a8b0

Added destructor to the routepathersearch class. Attempt to fix the memory leak reported by Unknown-Horizons.
author wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 30 Jun 2009 20:03:02 +0000
parents 6362c6812580
children faabfaf25f15
rev   line source
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
1 /***************************************************************************
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
2 * Copyright (C) 2005-2008 by the FIFE team *
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
3 * http://www.fifengine.de *
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
4 * This file is part of FIFE. *
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
5 * *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
6 * FIFE is free software; you can redistribute it and/or *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
7 * modify it under the terms of the GNU Lesser General Public *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
8 * License as published by the Free Software Foundation; either *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
9 * version 2.1 of the License, or (at your option) any later version. *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
10 * *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
11 * This library is distributed in the hope that it will be useful, *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
14 * Lesser General Public License for more details. *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
15 * *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
16 * You should have received a copy of the GNU Lesser General Public *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
17 * License along with this library; if not, write to the *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
18 * Free Software Foundation, Inc., *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
20 ***************************************************************************/
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
21
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
22 #ifndef FIFE_PATHFINDER_ROUTEPATHERSEARCH
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
23 #define FIFE_PATHFINDER_ROUTEPATHERSEARCH
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
24
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
25 // Standard C++ library includes
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
26
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
27 // 3rd party library includes
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
28
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
29 // FIFE includes
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
30 // These includes are split up in two parts, separated by one empty line
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
31 // First block: files included from the FIFE root src directory
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
32 // Second block: files included from the same folder
292
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
33 //#include "pathfinder/search.h"
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
34 #include "util/structures/priorityqueue.h"
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
35
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
36 namespace FIFE {
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
37
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
38 class Map;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
39 class SearchSpace;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
40 class Heuristic;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
41
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
42 /** RoutePatherSearch using A*
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
43 *
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
44 * For now this class uses offline A*, however eventually this will be switched over to RTA*.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
45 */
292
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
46 class RoutePatherSearch {
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
47 public:
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
48 RoutePatherSearch(const int session_id, const Location& from, const Location& to, SearchSpace* searchSpace);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
49
293
66df2422a8b0 Added destructor to the routepathersearch class.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 292
diff changeset
50 ~RoutePatherSearch();
66df2422a8b0 Added destructor to the routepathersearch class.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 292
diff changeset
51
292
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
52 typedef std::list<Location> Path;
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
53 /** An enumeration of the different status the search can be in.
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
54 *
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
55 */
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
56 enum SearchStatus {
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
57 search_status_failed,
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
58 search_status_complete,
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
59 search_status_incomplete
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
60 };
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
61
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
62 virtual void updateSearch();
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
63
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
64 virtual Path calcPath();
292
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
65
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
66 /** Retrieves the session id.
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
67 *
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
68 * @return The searches session id in the pather.
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
69 */
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
70 int getSessionId() const {
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
71 return m_sessionId;
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
72 }
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
73
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
74 /** Retrieves the pather.
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
75 *
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
76 * @return A pointer to the abstract pather which
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
77 */
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
78 SearchSpace* getSearchSpace() const {
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
79 return m_searchspace;
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
80 }
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
81
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
82 /** A small function which returns the current status of the search.
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
83 *
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
84 * @return An integer value representing the status, which is enumerated by this class.
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
85 */
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
86 int getSearchStatus() const {
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
87 return m_status;
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
88 }
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
89
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
90 protected:
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
91
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
92 /** Sets the current status of the search.
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
93 *
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
94 * @param status The status to set.
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
95 */
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
96 void setSearchStatus(const SearchStatus status) {
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
97 m_status = status;
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
98 }
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
99
293
66df2422a8b0 Added destructor to the routepathersearch class.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 292
diff changeset
100 private:
292
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
101 //A location object representing where the search started.
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
102 Location m_to;
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
103
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
104 //A location object representing where the search ended.
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
105 Location m_from;
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
106
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
107 //An integer containing the session id for this search.
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
108 int m_sessionId;
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
109
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
110 //A pointer to the pather that owns this search.
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
111 SearchSpace* m_searchspace;
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
112
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
113 //An enumeration of the searches current status.
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
114 SearchStatus m_status;
6362c6812580 combine routepathersearch and search class to clean up the code.
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
115
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
116 //The class to use to calculate the heuristic value.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
117 Heuristic* m_heuristic;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
118 //The destination coordinate as an int.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
119 int m_destCoordInt;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
120 //The start coordinate as an int.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
121 int m_startCoordInt;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
122 //The next coordinate int to check out.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
123 int m_next;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
124 //The shortest path tree.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
125 std::vector<int> m_spt;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
126 //The search frontier.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
127 std::vector<int> m_sf;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
128 //A table to hold the costs.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
129 std::vector<float> m_gCosts;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
130 //priority queue to hold nodes on the sf in order.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
131 PriorityQueue<int, float> m_sortedfrontier;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
132 };
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
133
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
134 }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
135
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
136 #endif