source: tspsg/docs/html/class_c_t_s_p_solver.html @ 1babbd6ba3

0.1.3.145-beta1-symbian0.1.4.170-beta2-bb10appveyorimgbotreadme
Last change on this file since 1babbd6ba3 was 1babbd6ba3, checked in by Oleksii Serdiuk, 14 years ago

+ Added Installation Guide.

  • Updated translations.
  • Updated documentaion.
  • Property mode set to 100644
File size: 26.9 KB
Line 
1<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6<title>TSPSG: TSP Solver and Generator: CTSPSolver Class Reference</title>
7<link href="tabs.css" rel="stylesheet" type="text/css"/>
8<link href="search/search.css" rel="stylesheet" type="text/css"/>
9<script type="text/javaScript" src="search/search.js"></script>
10<link href="doxygen.css" rel="stylesheet" type="text/css"/>
11</head>
12<body onload='searchBox.OnSelectItem(0);'>
13<!-- Generated by Doxygen 1.6.1 -->
14<script type="text/javascript"><!--
15var searchBox = new SearchBox("searchBox", "search",false,'Search');
16--></script>
17<script type="text/javascript">
18<!--
19function changeDisplayState (e){
20  var num=this.id.replace(/[^[0-9]/g,'');
21  var button=this.firstChild;
22  var sectionDiv=document.getElementById('dynsection'+num);
23  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
24    sectionDiv.style.display='block';
25    button.src='open.gif';
26  }else{
27    sectionDiv.style.display='none';
28    button.src='closed.gif';
29  }
30}
31function initDynSections(){
32  var divs=document.getElementsByTagName('div');
33  var sectionCounter=1;
34  for(var i=0;i<divs.length-1;i++){
35    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
36      var header=divs[i];
37      var section=divs[i+1];
38      var button=header.firstChild;
39      if (button!='IMG'){
40        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
41        button=document.createElement('img');
42        divs[i].insertBefore(button,divs[i].firstChild);
43      }
44      header.style.cursor='pointer';
45      header.onclick=changeDisplayState;
46      header.id='dynheader'+sectionCounter;
47      button.src='closed.gif';
48      section.id='dynsection'+sectionCounter;
49      section.style.display='none';
50      section.style.marginLeft='14px';
51      sectionCounter++;
52    }
53  }
54}
55window.onload = initDynSections;
56-->
57</script>
58<div class="navigation" id="top">
59  <div class="tabs">
60    <ul>
61      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
62      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
63      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
64      <li><a href="files.html"><span>Files</span></a></li>
65      <li>
66        <div id="MSearchBox" class="MSearchBoxInactive">
67        <img id="MSearchSelect" src="search/search.png"
68             onmouseover="return searchBox.OnSearchSelectShow()"
69             onmouseout="return searchBox.OnSearchSelectHide()"
70             alt=""/>
71        <input type="text" id="MSearchField" value="Search" accesskey="S"
72             onfocus="searchBox.OnSearchFieldFocus(true)" 
73             onblur="searchBox.OnSearchFieldFocus(false)" 
74             onkeyup="searchBox.OnSearchFieldChange(event)"/>
75        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
76        </div>
77      </li>
78    </ul>
79  </div>
80  <div class="tabs">
81    <ul>
82      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
83      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
84      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
85    </ul>
86  </div>
87</div>
88<div class="contents">
89<h1>CTSPSolver Class Reference</h1><!-- doxytag: class="CTSPSolver" --><!-- doxytag: inherits="QObject" -->
90<p>This class solves Travelling Salesman Problem task. 
91<a href="#_details">More...</a></p>
92
93<p><code>#include &lt;<a class="el" href="tspsolver_8h_source.html">tspsolver.h</a>&gt;</code></p>
94<div class="dynheader">
95Inheritance diagram for CTSPSolver:</div>
96<div class="dynsection">
97<div class="center"><img src="class_c_t_s_p_solver__inherit__graph.png" border="0" usemap="#_c_t_s_p_solver_inherit__map" alt="Inheritance graph"/></div>
98<map name="_c_t_s_p_solver_inherit__map" id="_c_t_s_p_solver_inherit__map">
99<area shape="rect" id="node2" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qobject.html" title="QObject" alt="" coords="16,6,85,34"/>
100</map>
101<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
102<div class="dynheader">
103Collaboration diagram for CTSPSolver:</div>
104<div class="dynsection">
105<div class="center"><img src="class_c_t_s_p_solver__coll__graph.png" border="0" usemap="#_c_t_s_p_solver_coll__map" alt="Collaboration graph"/></div>
106<map name="_c_t_s_p_solver_coll__map" id="_c_t_s_p_solver_coll__map">
107<area shape="rect" id="node2" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qobject.html" title="QObject" alt="" coords="148,109,217,137"/>
108<area shape="rect" id="node4" href="struct_s_step.html" title="This structure represents one step of solving." alt="" coords="241,109,297,137"/>
109<area shape="rect" id="node6" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qlist.html" title="QList\&lt; QList\&lt; double \&gt; \&gt;" alt="" coords="5,6,173,34"/>
110<area shape="rect" id="node9" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qlist.html" title="QList\&lt; SCandidate \&gt;" alt="" coords="197,6,341,34"/>
111<area shape="rect" id="node11" href="struct_s_candidate.html" title="A structure that represents a candidate for branching." alt="" coords="365,6,453,34"/>
112<area shape="rect" id="node13" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qhash.html" title="QHash\&lt; int, int \&gt;" alt="" coords="387,109,507,137"/>
113<area shape="rect" id="node15" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmutex.html" title="QMutex" alt="" coords="531,109,597,137"/>
114</map>
115<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
116
117<p><a href="class_c_t_s_p_solver-members.html">List of all members.</a></p>
118<table border="0" cellpadding="0" cellspacing="0">
119<tr><td colspan="2"><h2>Public Slots</h2></td></tr>
120<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a996ac169e8ed087170bd8610fa4aa715"></a><!-- doxytag: member="CTSPSolver::cancel" ref="a996ac169e8ed087170bd8610fa4aa715" args="()" -->
121void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_solver.html#a996ac169e8ed087170bd8610fa4aa715">cancel</a> ()</td></tr>
122<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cancels the solution process. <br/></td></tr>
123<tr><td colspan="2"><h2>Signals</h2></td></tr>
124<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_solver.html#ae12895fa529a965b57204e355b9012d7">routePartFound</a> (int n)</td></tr>
125<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This signal is emitted once every time a part of the route is found.  <a href="#ae12895fa529a965b57204e355b9012d7"></a><br/></td></tr>
126<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
127<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_solver.html#a4a519caa89db1683693759a92a65319c">CTSPSolver</a> (<a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qobject.html">QObject</a> *<a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qobject.html#parent">parent</a>=NULL)</td></tr>
128<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs <a class="el" href="class_c_t_s_p_solver.html" title="This class solves Travelling Salesman Problem task.">CTSPSolver</a> object.  <a href="#a4a519caa89db1683693759a92a65319c"></a><br/></td></tr>
129<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_solver.html#acf86422c1b8ff8e5b9bc88e09c57c48b">cleanup</a> (bool processEvents=false)</td></tr>
130<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cleans up the object and frees up memory used by the solution tree.  <a href="#acf86422c1b8ff8e5b9bc88e09c57c48b"></a><br/></td></tr>
131<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_solver.html#a57556c971a25e3556c4aa3cc1fd2d3d0">getSortedPath</a> () const </td></tr>
132<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the sorted optimal path, starting from City 1.  <a href="#a57556c971a25e3556c4aa3cc1fd2d3d0"></a><br/></td></tr>
133<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_solver.html#a28d546e840cf53c639b45c0f26419f7a">isOptimal</a> () const </td></tr>
134<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Indicates whether or not the solution is definitely optimal.  <a href="#a28d546e840cf53c639b45c0f26419f7a"></a><br/></td></tr>
135<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_s_step.html">SStep</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_solver.html#a0f0f0aa60d05c97f3b0e867a381de558">solve</a> (int numCities, const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qlist.html">TMatrix</a> &amp;task)</td></tr>
136<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Solves the given task.  <a href="#a0f0f0aa60d05c97f3b0e867a381de558"></a><br/></td></tr>
137<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_solver.html#a80cff5d533711ab1929de1fdf09495b7">wasCanceled</a> () const </td></tr>
138<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Indicates whether or not the solution process was canceled.  <a href="#a80cff5d533711ab1929de1fdf09495b7"></a><br/></td></tr>
139<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
140<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_solver.html#a677a878c4c8a06316a5d8d5a4fc8ab65">getVersionId</a> ()</td></tr>
141<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns CTSPSolver's version ID.  <a href="#a677a878c4c8a06316a5d8d5a4fc8ab65"></a><br/></td></tr>
142</table>
143<hr/><a name="_details"></a><h2>Detailed Description</h2>
144<p>This class solves Travelling Salesman Problem task. </p>
145<dl class="author"><dt><b>Author:</b></dt><dd>Copyright &copy; 2007-2010 Lёppa &lt;contacts[at]oleksii[dot]name&gt; </dd></dl>
146<hr/><h2>Constructor &amp; Destructor Documentation</h2>
147<a class="anchor" id="a4a519caa89db1683693759a92a65319c"></a><!-- doxytag: member="CTSPSolver::CTSPSolver" ref="a4a519caa89db1683693759a92a65319c" args="(QObject *parent=NULL)" -->
148<div class="memitem">
149<div class="memproto">
150      <table class="memname">
151        <tr>
152          <td class="memname">CTSPSolver::CTSPSolver </td>
153          <td>(</td>
154          <td class="paramtype"><a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qobject.html">QObject</a> *&nbsp;</td>
155          <td class="paramname"> <em>parent</em> = <code>NULL</code></td>
156          <td>&nbsp;)&nbsp;</td>
157          <td></td>
158        </tr>
159      </table>
160</div>
161<div class="memdoc">
162
163<p>Constructs <a class="el" href="class_c_t_s_p_solver.html" title="This class solves Travelling Salesman Problem task.">CTSPSolver</a> object. </p>
164<dl><dt><b>Parameters:</b></dt><dd>
165  <table border="0" cellspacing="2" cellpadding="0">
166    <tr><td valign="top"></td><td valign="top"><em>parent</em>&nbsp;</td><td>A parent object. </td></tr>
167  </table>
168  </dd>
169</dl>
170
171</div>
172</div>
173<hr/><h2>Member Function Documentation</h2>
174<a class="anchor" id="acf86422c1b8ff8e5b9bc88e09c57c48b"></a><!-- doxytag: member="CTSPSolver::cleanup" ref="acf86422c1b8ff8e5b9bc88e09c57c48b" args="(bool processEvents=false)" -->
175<div class="memitem">
176<div class="memproto">
177      <table class="memname">
178        <tr>
179          <td class="memname">void CTSPSolver::cleanup </td>
180          <td>(</td>
181          <td class="paramtype">bool&nbsp;</td>
182          <td class="paramname"> <em>processEvents</em> = <code>false</code></td>
183          <td>&nbsp;)&nbsp;</td>
184          <td></td>
185        </tr>
186      </table>
187</div>
188<div class="memdoc">
189
190<p>Cleans up the object and frees up memory used by the solution tree. </p>
191<dl><dt><b>Parameters:</b></dt><dd>
192  <table border="0" cellspacing="2" cellpadding="0">
193    <tr><td valign="top"></td><td valign="top"><em>processEvents</em>&nbsp;</td><td>If set to <code>true</code> then <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qcoreapplication.html#processEvents">QApplication::processEvents(QEventLoop::ExcludeUserInputEvents)</a> will be called from time to time while cleaning up. </td></tr>
194  </table>
195  </dd>
196</dl>
197<dl class="warning"><dt><b>Warning:</b></dt><dd>After call to this function a solution tree returned by the <a class="el" href="class_c_t_s_p_solver.html#a0f0f0aa60d05c97f3b0e867a381de558" title="Solves the given task.">solve()</a> function is no longer valid. </dd></dl>
198<dl class="note"><dt><b>Note:</b></dt><dd>It is not required to call this function manually. This function is always called by <a class="el" href="class_c_t_s_p_solver.html#a0f0f0aa60d05c97f3b0e867a381de558" title="Solves the given task.">solve()</a> at the beginning of the solution process.</dd></dl>
199<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_c_t_s_p_solver.html#a0f0f0aa60d05c97f3b0e867a381de558" title="Solves the given task.">solve()</a> </dd></dl>
200
201<p><div class="dynheader">
202Here is the call graph for this function:</div>
203<div class="dynsection">
204<div class="center"><img src="class_c_t_s_p_solver_acf86422c1b8ff8e5b9bc88e09c57c48b_cgraph.png" border="0" usemap="#class_c_t_s_p_solver_acf86422c1b8ff8e5b9bc88e09c57c48b_cgraph_map" alt=""></div>
205<map name="class_c_t_s_p_solver_acf86422c1b8ff8e5b9bc88e09c57c48b_cgraph_map" id="class_c_t_s_p_solver_acf86422c1b8ff8e5b9bc88e09c57c48b_cgraph">
206<area shape="rect" id="node3" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qhash.html#clear" title="QHash::clear" alt="" coords="264,5,360,33"/>
207<area shape="rect" id="node5" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qapplication.html#restoreOverrideCursor" title="QApplication::restoreOverrideCursor" alt="" coords="199,55,425,83"/>
208<area shape="rect" id="node7" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qapplication.html#setOverrideCursor" title="QApplication::setOverrideCursor" alt="" coords="209,106,415,134"/>
209</map>
210</div>
211</p>
212
213<p><div class="dynheader">
214Here is the caller graph for this function:</div>
215<div class="dynsection">
216<div class="center"><img src="class_c_t_s_p_solver_acf86422c1b8ff8e5b9bc88e09c57c48b_icgraph.png" border="0" usemap="#class_c_t_s_p_solver_acf86422c1b8ff8e5b9bc88e09c57c48b_icgraph_map" alt=""></div>
217<map name="class_c_t_s_p_solver_acf86422c1b8ff8e5b9bc88e09c57c48b_icgraph_map" id="class_c_t_s_p_solver_acf86422c1b8ff8e5b9bc88e09c57c48b_icgraph">
218<area shape="rect" id="node3" href="class_c_t_s_p_solver.html#a0f0f0aa60d05c97f3b0e867a381de558" title="Solves the given task." alt="" coords="197,5,325,33"/>
219</map>
220</div>
221</p>
222
223</div>
224</div>
225<a class="anchor" id="a57556c971a25e3556c4aa3cc1fd2d3d0"></a><!-- doxytag: member="CTSPSolver::getSortedPath" ref="a57556c971a25e3556c4aa3cc1fd2d3d0" args="() const " -->
226<div class="memitem">
227<div class="memproto">
228      <table class="memname">
229        <tr>
230          <td class="memname"><a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qstring.html">QString</a> CTSPSolver::getSortedPath </td>
231          <td>(</td>
232          <td class="paramname"></td>
233          <td>&nbsp;)&nbsp;</td>
234          <td> const</td>
235        </tr>
236      </table>
237</div>
238<div class="memdoc">
239
240<p>Returns the sorted optimal path, starting from City 1. </p>
241<dl class="return"><dt><b>Returns:</b></dt><dd>A string, containing sorted optimal path. </dd></dl>
242
243<p><div class="dynheader">
244Here is the call graph for this function:</div>
245<div class="dynsection">
246<div class="center"><img src="class_c_t_s_p_solver_a57556c971a25e3556c4aa3cc1fd2d3d0_cgraph.png" border="0" usemap="#class_c_t_s_p_solver_a57556c971a25e3556c4aa3cc1fd2d3d0_cgraph_map" alt=""></div>
247<map name="class_c_t_s_p_solver_a57556c971a25e3556c4aa3cc1fd2d3d0_cgraph_map" id="class_c_t_s_p_solver_a57556c971a25e3556c4aa3cc1fd2d3d0_cgraph">
248<area shape="rect" id="node3" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qhash.html#isEmpty" title="QHash::isEmpty" alt="" coords="235,5,352,33"/>
249<area shape="rect" id="node5" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qhash.html#size" title="QHash::size" alt="" coords="247,55,340,83"/>
250<area shape="rect" id="node7" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qobject.html#tr" title="QObject::tr" alt="" coords="251,106,336,134"/>
251</map>
252</div>
253</p>
254
255</div>
256</div>
257<a class="anchor" id="a677a878c4c8a06316a5d8d5a4fc8ab65"></a><!-- doxytag: member="CTSPSolver::getVersionId" ref="a677a878c4c8a06316a5d8d5a4fc8ab65" args="()" -->
258<div class="memitem">
259<div class="memproto">
260      <table class="memname">
261        <tr>
262          <td class="memname"><a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qstring.html">QString</a> CTSPSolver::getVersionId </td>
263          <td>(</td>
264          <td class="paramname"></td>
265          <td>&nbsp;)&nbsp;</td>
266          <td><code> [static]</code></td>
267        </tr>
268      </table>
269</div>
270<div class="memdoc">
271
272<p>Returns CTSPSolver's version ID. </p>
273<dl class="return"><dt><b>Returns:</b></dt><dd>A string: <b>$Id: tspsolver.cpp 99 2010-03-22 20:45:16Z laleppa $</b>. </dd></dl>
274
275</div>
276</div>
277<a class="anchor" id="a28d546e840cf53c639b45c0f26419f7a"></a><!-- doxytag: member="CTSPSolver::isOptimal" ref="a28d546e840cf53c639b45c0f26419f7a" args="() const " -->
278<div class="memitem">
279<div class="memproto">
280      <table class="memname">
281        <tr>
282          <td class="memname">bool CTSPSolver::isOptimal </td>
283          <td>(</td>
284          <td class="paramname"></td>
285          <td>&nbsp;)&nbsp;</td>
286          <td> const</td>
287        </tr>
288      </table>
289</div>
290<div class="memdoc">
291
292<p>Indicates whether or not the solution is definitely optimal. </p>
293<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the solution is definitely optimal, otherwise <code>false</code>.</dd></dl>
294<p>The solution may need some further iterations to determine whether or not it is optimal. In such cases this function returns <code>false</code>. </p>
295
296</div>
297</div>
298<a class="anchor" id="ae12895fa529a965b57204e355b9012d7"></a><!-- doxytag: member="CTSPSolver::routePartFound" ref="ae12895fa529a965b57204e355b9012d7" args="(int n)" -->
299<div class="memitem">
300<div class="memproto">
301      <table class="memname">
302        <tr>
303          <td class="memname">void CTSPSolver::routePartFound </td>
304          <td>(</td>
305          <td class="paramtype">int&nbsp;</td>
306          <td class="paramname"> <em>n</em></td>
307          <td>&nbsp;)&nbsp;</td>
308          <td><code> [signal]</code></td>
309        </tr>
310      </table>
311</div>
312<div class="memdoc">
313
314<p>This signal is emitted once every time a part of the route is found. </p>
315<dl><dt><b>Parameters:</b></dt><dd>
316  <table border="0" cellspacing="2" cellpadding="0">
317    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>Indicates the number of the route parts found. </td></tr>
318  </table>
319  </dd>
320</dl>
321
322<p><div class="dynheader">
323Here is the caller graph for this function:</div>
324<div class="dynsection">
325<div class="center"><img src="class_c_t_s_p_solver_ae12895fa529a965b57204e355b9012d7_icgraph.png" border="0" usemap="#class_c_t_s_p_solver_ae12895fa529a965b57204e355b9012d7_icgraph_map" alt=""></div>
326<map name="class_c_t_s_p_solver_ae12895fa529a965b57204e355b9012d7_icgraph_map" id="class_c_t_s_p_solver_ae12895fa529a965b57204e355b9012d7_icgraph">
327<area shape="rect" id="node3" href="class_c_t_s_p_solver.html#a0f0f0aa60d05c97f3b0e867a381de558" title="Solves the given task." alt="" coords="243,5,371,33"/>
328</map>
329</div>
330</p>
331
332</div>
333</div>
334<a class="anchor" id="a0f0f0aa60d05c97f3b0e867a381de558"></a><!-- doxytag: member="CTSPSolver::solve" ref="a0f0f0aa60d05c97f3b0e867a381de558" args="(int numCities, const TMatrix &amp;task)" -->
335<div class="memitem">
336<div class="memproto">
337      <table class="memname">
338        <tr>
339          <td class="memname"><a class="el" href="struct_s_step.html">SStep</a> * CTSPSolver::solve </td>
340          <td>(</td>
341          <td class="paramtype">int&nbsp;</td>
342          <td class="paramname"> <em>numCities</em>, </td>
343        </tr>
344        <tr>
345          <td class="paramkey"></td>
346          <td></td>
347          <td class="paramtype">const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qlist.html">TMatrix</a> &amp;&nbsp;</td>
348          <td class="paramname"> <em>task</em></td><td>&nbsp;</td>
349        </tr>
350        <tr>
351          <td></td>
352          <td>)</td>
353          <td></td><td></td><td></td>
354        </tr>
355      </table>
356</div>
357<div class="memdoc">
358
359<p>Solves the given task. </p>
360<dl><dt><b>Parameters:</b></dt><dd>
361  <table border="0" cellspacing="2" cellpadding="0">
362    <tr><td valign="top"></td><td valign="top"><em>numCities</em>&nbsp;</td><td>Number of cities in the task. </td></tr>
363    <tr><td valign="top"></td><td valign="top"><em>task</em>&nbsp;</td><td>The matrix of city-to-city travel costs. </td></tr>
364  </table>
365  </dd>
366</dl>
367<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to the root of the solution tree.</dd></dl>
368<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>TODO: Comment the algorithm. </dd></dl>
369
370<p><div class="dynheader">
371Here is the call graph for this function:</div>
372<div class="dynsection">
373<div class="center"><img src="class_c_t_s_p_solver_a0f0f0aa60d05c97f3b0e867a381de558_cgraph.png" border="0" usemap="#class_c_t_s_p_solver_a0f0f0aa60d05c97f3b0e867a381de558_cgraph_map" alt=""></div>
374<map name="class_c_t_s_p_solver_a0f0f0aa60d05c97f3b0e867a381de558_cgraph_map" id="class_c_t_s_p_solver_a0f0f0aa60d05c97f3b0e867a381de558_cgraph">
375<area shape="rect" id="node3" href="class_c_t_s_p_solver.html#acf86422c1b8ff8e5b9bc88e09c57c48b" title="Cleans up the object and frees up memory used by the solution tree." alt="" coords="204,55,348,83"/>
376<area shape="rect" id="node11" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmutexlocker.html#relock" title="QMutexLocker::relock" alt="" coords="201,106,351,134"/>
377<area shape="rect" id="node13" href="class_c_t_s_p_solver.html#ae12895fa529a965b57204e355b9012d7" title="This signal is emitted once every time a part of the route is found." alt="" coords="183,157,369,185"/>
378<area shape="rect" id="node15" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qhash.html#size" title="QHash::size" alt="" coords="229,207,323,235"/>
379<area shape="rect" id="node17" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmutexlocker.html#unlock" title="QMutexLocker::unlock" alt="" coords="200,258,352,286"/>
380<area shape="rect" id="node5" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qhash.html#clear" title="QHash::clear" alt="" coords="485,5,581,33"/>
381<area shape="rect" id="node7" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qapplication.html#restoreOverrideCursor" title="QApplication::restoreOverrideCursor" alt="" coords="420,55,647,83"/>
382<area shape="rect" id="node9" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qapplication.html#setOverrideCursor" title="QApplication::setOverrideCursor" alt="" coords="431,106,636,134"/>
383</map>
384</div>
385</p>
386
387</div>
388</div>
389<a class="anchor" id="a80cff5d533711ab1929de1fdf09495b7"></a><!-- doxytag: member="CTSPSolver::wasCanceled" ref="a80cff5d533711ab1929de1fdf09495b7" args="() const " -->
390<div class="memitem">
391<div class="memproto">
392      <table class="memname">
393        <tr>
394          <td class="memname">bool CTSPSolver::wasCanceled </td>
395          <td>(</td>
396          <td class="paramname"></td>
397          <td>&nbsp;)&nbsp;</td>
398          <td> const</td>
399        </tr>
400      </table>
401</div>
402<div class="memdoc">
403
404<p>Indicates whether or not the solution process was canceled. </p>
405<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the solution process was canceled, otherwise <code>false</code>. </dd></dl>
406
407</div>
408</div>
409<hr/>The documentation for this class was generated from the following files:<ul>
410<li>src/<a class="el" href="tspsolver_8h_source.html">tspsolver.h</a></li>
411<li>src/tspsolver.cpp</li>
412</ul>
413</div>
414<!--- window showing the filter options -->
415<div id="MSearchSelectWindow"
416     onmouseover="return searchBox.OnSearchSelectShow()"
417     onmouseout="return searchBox.OnSearchSelectHide()"
418     onkeydown="return searchBox.OnSearchSelectKey(event)">
419<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>
420
421<!-- iframe showing the search results (closed by default) -->
422<div id="MSearchResultsWindow">
423<iframe src="" frameborder="0" 
424        name="MSearchResults" id="MSearchResults">
425</iframe>
426</div>
427
428<hr size="1"/><address style="text-align: right;"><small>Generated on Thu Apr 8 23:15:53 2010 for TSPSG: TSP Solver and Generator by&nbsp;
429<a href="http://www.doxygen.org/index.html">
430<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
431</body>
432</html>
Note: See TracBrowser for help on using the repository browser.