a00001.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
  5. <title>GTL - Graph Template Library: algorithm Class Reference</title>
  6. <link href="doxygen.css" rel="stylesheet" type="text/css">
  7. </head>
  8. <body>
  9. <p class="links">
  10. <a href="../index.html">Home</a> |
  11. Documentation |
  12. <a href="../register.html">Download</a> |
  13. <a href="../platforms.html">Platforms</a> |
  14. <a href="../refer.html">Projects</a> |
  15. <a href="../lists.html">Mailing Lists</a> |
  16. <a href="../history.html">Version History</a>
  17. </p>
  18. <!-- Generated by Doxygen 1.5.3 -->
  19. <div class="tabs">
  20. <ul>
  21. <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
  22. <li class="current"><a href="classes.html"><span>Classes</span></a></li>
  23. <li><a href="files.html"><span>Files</span></a></li>
  24. <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  25. </ul>
  26. </div>
  27. <div class="tabs">
  28. <ul>
  29. <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
  30. <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
  31. <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
  32. <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  33. </ul>
  34. </div>
  35. <h1>algorithm Class Reference</h1><!-- doxytag: class="algorithm" -->Abstract baseclass for all algoritm-classes.
  36. <a href="#_details">More...</a>
  37. <p>
  38. <div class="dynheader">
  39. Inheritance diagram for algorithm:</div>
  40. <div class="dynsection">
  41. <p><center><img src="a00102.gif" border="0" usemap="#a00103" alt="Inheritance graph"></center>
  42. <map name="a00103">
  43. <area shape="rect" href="a00002.html" title="Bellman Ford algorithm." alt="" coords="147,5,245,29"><area shape="rect" href="a00003.html" title="Breadth&#45;First&#45;Search (BFS) algorithm." alt="" coords="176,53,216,77"><area shape="rect" href="a00005.html" title="Dijkstra&#39;s Algorithm for computing a shortest path from a single source to a..." alt="" coords="151,101,241,125"><area shape="rect" href="a00008.html" title="Depth&#45;First&#45;Search (DFS) algorithm." alt="" coords="176,149,216,173"><area shape="rect" href="a00009.html" title="Dijkstra&#39;s Algorithm for computing single source shortest path." alt="" coords="164,197,228,221"><area shape="rect" href="a00012.html" title="Heuristic graph bi&#45;partitioning algorithm (Fiduccia&#45;Mattheyses)." alt="" coords="149,245,243,269"><area shape="rect" href="a00015.html" title="Maximum flow algorithm (Edmonds&#45;Karp)." alt="" coords="152,293,240,317"><area shape="rect" href="a00016.html" title="Maximum flow algorithm (Malhotra, Kumar, Maheshwari)." alt="" coords="149,341,243,365"><area shape="rect" href="a00017.html" title="Maximum flow algorithm with shortest augmenting paths." alt="" coords="147,389,245,413"><area shape="rect" href="a00018.html" title="Kruskal&#39;s algorithm for finding minimal spanning tree of a graph." alt="" coords="159,437,233,461"><area shape="rect" href="a00023.html" title="Tests if a graph can be drawn on a plane without any edge crossings." alt="" coords="160,485,232,509"><area shape="rect" href="a00025.html" title="Heuristic graph bi&#45;partitioning algorithm (Wei&#45;Cheng)." alt="" coords="132,533,260,557"><area shape="rect" href="a00026.html" title="ST&#45;number algorithm." alt="" coords="153,581,239,605"><area shape="rect" href="a00004.html" title="Biconnectivity&#45;test and low&#45;numbers." alt="" coords="309,101,413,125"><area shape="rect" href="a00007.html" title="Connected components algorithm." alt="" coords="315,149,408,173"><area shape="rect" href="a00028.html" title="Topological sorting." alt="" coords="329,197,393,221"></map>
  44. <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
  45. <p>
  46. <a href="a00104.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
  47. <tr><td></td></tr>
  48. <tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
  49. <tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="a00001.html#f1a0078e153aa99c24f9bdf0d97f67105114c20e4a96a76b5de9f28bf15e282b">GTL_OK</a> = 1,
  50. <a class="el" href="a00001.html#f1a0078e153aa99c24f9bdf0d97f67106fcf574690bbd6cf710837a169510dd7">GTL_ERROR</a> = 0
  51. }</td></tr>
  52. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return values for <a class="el" href="a00001.html#76361fb03ad1cf643affc51821e43bed" title="Checks whether all preconditions are satisfied.">algorithm::check</a> and <a class="el" href="a00001.html#734b189509a8d6b56b65f8ff772d43ca" title="Applies algorithm to graph g.">algorithm::run</a>. <a href="a00001.html#f1a0078e153aa99c24f9bdf0d97f6710">More...</a><br></td></tr>
  53. <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
  54. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b79e1ddec2f2afdf4b36b10724db8b15"></a><!-- doxytag: member="algorithm::algorithm" ref="b79e1ddec2f2afdf4b36b10724db8b15" args="()" -->
  55. &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00001.html#b79e1ddec2f2afdf4b36b10724db8b15">algorithm</a> ()</td></tr>
  56. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an <a class="el" href="a00001.html" title="Abstract baseclass for all algoritm-classes.">algorithm</a> object. <br></td></tr>
  57. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dca9b1e7fa3afd914519a9dbb44e9fd5"></a><!-- doxytag: member="algorithm::~algorithm" ref="dca9b1e7fa3afd914519a9dbb44e9fd5" args="()" -->
  58. virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00001.html#dca9b1e7fa3afd914519a9dbb44e9fd5">~algorithm</a> ()</td></tr>
  59. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroys the <a class="el" href="a00001.html" title="Abstract baseclass for all algoritm-classes.">algorithm</a> object. <br></td></tr>
  60. <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00001.html#734b189509a8d6b56b65f8ff772d43ca">run</a> (<a class="el" href="a00014.html">graph</a> &amp;g)=0</td></tr>
  61. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Applies algorithm to graph g. <a href="#734b189509a8d6b56b65f8ff772d43ca"></a><br></td></tr>
  62. <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00001.html#76361fb03ad1cf643affc51821e43bed">check</a> (<a class="el" href="a00014.html">graph</a> &amp;g)=0</td></tr>
  63. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks whether all preconditions are satisfied. <a href="#76361fb03ad1cf643affc51821e43bed"></a><br></td></tr>
  64. <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00001.html#21aba63d066ae7897de6ca7d8425c408">reset</a> ()=0</td></tr>
  65. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets algorithm. <a href="#21aba63d066ae7897de6ca7d8425c408"></a><br></td></tr>
  66. </table>
  67. <hr><a name="_details"></a><h2>Detailed Description</h2>
  68. Abstract baseclass for all algoritm-classes.
  69. <p>
  70. <dl class="rcs" compact><dt><b>Date</b></dt><dd></dd></dl>
  71. <dl class="rcs" compact><dt><b>Revision</b></dt><dd></dd></dl>
  72. <hr><h2>Member Enumeration Documentation</h2>
  73. <a class="anchor" name="f1a0078e153aa99c24f9bdf0d97f6710"></a><!-- doxytag: member="algorithm::@0" ref="f1a0078e153aa99c24f9bdf0d97f6710" args="" -->
  74. <div class="memitem">
  75. <div class="memproto">
  76. <table class="memname">
  77. <tr>
  78. <td class="memname">anonymous enum </td>
  79. </tr>
  80. </table>
  81. </div>
  82. <div class="memdoc">
  83. <p>
  84. Return values for <a class="el" href="a00001.html#76361fb03ad1cf643affc51821e43bed" title="Checks whether all preconditions are satisfied.">algorithm::check</a> and <a class="el" href="a00001.html#734b189509a8d6b56b65f8ff772d43ca" title="Applies algorithm to graph g.">algorithm::run</a>.
  85. <p>
  86. <dl compact><dt><b>Enumerator: </b></dt><dd>
  87. <table border="0" cellspacing="2" cellpadding="0">
  88. <tr><td valign="top"><em><a class="anchor" name="f1a0078e153aa99c24f9bdf0d97f67105114c20e4a96a76b5de9f28bf15e282b"></a><!-- doxytag: member="GTL_OK" ref="f1a0078e153aa99c24f9bdf0d97f67105114c20e4a96a76b5de9f28bf15e282b" args="" -->GTL_OK</em>&nbsp;</td><td>
  89. Used as (positive) return value of <a class="el" href="a00001.html#76361fb03ad1cf643affc51821e43bed" title="Checks whether all preconditions are satisfied.">algorithm::check</a> and <a class="el" href="a00001.html#734b189509a8d6b56b65f8ff772d43ca" title="Applies algorithm to graph g.">algorithm::run</a>. </td></tr>
  90. <tr><td valign="top"><em><a class="anchor" name="f1a0078e153aa99c24f9bdf0d97f67106fcf574690bbd6cf710837a169510dd7"></a><!-- doxytag: member="GTL_ERROR" ref="f1a0078e153aa99c24f9bdf0d97f67106fcf574690bbd6cf710837a169510dd7" args="" -->GTL_ERROR</em>&nbsp;</td><td>
  91. Used as (negative) return value of <a class="el" href="a00001.html#76361fb03ad1cf643affc51821e43bed" title="Checks whether all preconditions are satisfied.">algorithm::check</a> and <a class="el" href="a00001.html#734b189509a8d6b56b65f8ff772d43ca" title="Applies algorithm to graph g.">algorithm::run</a>. </td></tr>
  92. </table>
  93. </dl>
  94. </div>
  95. </div><p>
  96. <hr><h2>Member Function Documentation</h2>
  97. <a class="anchor" name="734b189509a8d6b56b65f8ff772d43ca"></a><!-- doxytag: member="algorithm::run" ref="734b189509a8d6b56b65f8ff772d43ca" args="(graph &amp;g)=0" -->
  98. <div class="memitem">
  99. <div class="memproto">
  100. <table class="memname">
  101. <tr>
  102. <td class="memname">virtual int algorithm::run </td>
  103. <td>(</td>
  104. <td class="paramtype"><a class="el" href="a00014.html">graph</a> &amp;&nbsp;</td>
  105. <td class="paramname"> <em>g</em> </td>
  106. <td>&nbsp;)&nbsp;</td>
  107. <td width="100%"><code> [pure virtual]</code></td>
  108. </tr>
  109. </table>
  110. </div>
  111. <div class="memdoc">
  112. <p>
  113. Applies algorithm to graph g.
  114. <p>
  115. <dl compact><dt><b>Parameters:</b></dt><dd>
  116. <table border="0" cellspacing="2" cellpadding="0">
  117. <tr><td valign="top"></td><td valign="top"><em>g</em>&nbsp;</td><td>graph </td></tr>
  118. </table>
  119. </dl>
  120. <dl compact><dt><b>Return values:</b></dt><dd>
  121. <table border="0" cellspacing="2" cellpadding="0">
  122. <tr><td valign="top"></td><td valign="top"><em><a class="el" href="a00001.html#f1a0078e153aa99c24f9bdf0d97f67105114c20e4a96a76b5de9f28bf15e282b">algorithm::GTL_OK</a></em>&nbsp;</td><td>on success </td></tr>
  123. <tr><td valign="top"></td><td valign="top"><em><a class="el" href="a00001.html#f1a0078e153aa99c24f9bdf0d97f67106fcf574690bbd6cf710837a169510dd7">algorithm::GTL_ERROR</a></em>&nbsp;</td><td>otherwise </td></tr>
  124. </table>
  125. </dl>
  126. <p>Implemented in <a class="el" href="a00002.html#226308389f3c36dfc02768c09f777a3b">bellman_ford</a>, <a class="el" href="a00003.html#06ae16bd0f3bb2f8eb6b3e36659ba82e">bfs</a>, <a class="el" href="a00005.html#1d2f36d3977ef90285442a269a03b919">bid_dijkstra</a>, <a class="el" href="a00008.html#f0863b8974d5fd58cd0375c78ed8163b">dfs</a>, <a class="el" href="a00009.html#7b30f3d8ad42baae27989bc14befe0d0">dijkstra</a>, <a class="el" href="a00012.html#015b171fcaa01973ebe6c6a46a727097">fm_partition</a>, <a class="el" href="a00015.html#0a4391b9093d6966b47c023a555099e2">maxflow_ff</a>, <a class="el" href="a00016.html#07c7cb1ae5db23d87cf49ce7769b2814">maxflow_pp</a>, <a class="el" href="a00017.html#b4305a2bb370ad9c43cc68d339b2dda0">maxflow_sap</a>, <a class="el" href="a00018.html#c025e8dad0db7a6a1e0e7b476b547802">min_tree</a>, <a class="el" href="a00023.html#93232e765c08dd2a4c00d192bb48b5fc">planarity</a>, <a class="el" href="a00025.html#4ab180ca4cf57c811e3478c3de4c4dc3">ratio_cut_partition</a>, and <a class="el" href="a00026.html#f902a0c05d07d47b587e8f7a6b7beaa1">st_number</a>.</p>
  127. </div>
  128. </div><p>
  129. <a class="anchor" name="76361fb03ad1cf643affc51821e43bed"></a><!-- doxytag: member="algorithm::check" ref="76361fb03ad1cf643affc51821e43bed" args="(graph &amp;g)=0" -->
  130. <div class="memitem">
  131. <div class="memproto">
  132. <table class="memname">
  133. <tr>
  134. <td class="memname">virtual int algorithm::check </td>
  135. <td>(</td>
  136. <td class="paramtype"><a class="el" href="a00014.html">graph</a> &amp;&nbsp;</td>
  137. <td class="paramname"> <em>g</em> </td>
  138. <td>&nbsp;)&nbsp;</td>
  139. <td width="100%"><code> [pure virtual]</code></td>
  140. </tr>
  141. </table>
  142. </div>
  143. <div class="memdoc">
  144. <p>
  145. Checks whether all preconditions are satisfied.
  146. <p>
  147. <em>Please</em> <em>note:</em> It is definitly required (and <a class="el" href="a00001.html#734b189509a8d6b56b65f8ff772d43ca" title="Applies algorithm to graph g.">run</a> relies on it), that this method was called in advance.<p>
  148. <dl compact><dt><b>Parameters:</b></dt><dd>
  149. <table border="0" cellspacing="2" cellpadding="0">
  150. <tr><td valign="top"></td><td valign="top"><em>g</em>&nbsp;</td><td>graph </td></tr>
  151. </table>
  152. </dl>
  153. <dl compact><dt><b>Return values:</b></dt><dd>
  154. <table border="0" cellspacing="2" cellpadding="0">
  155. <tr><td valign="top"></td><td valign="top"><em><a class="el" href="a00001.html#f1a0078e153aa99c24f9bdf0d97f67105114c20e4a96a76b5de9f28bf15e282b">algorithm::GTL_OK</a></em>&nbsp;</td><td>if algorithm can be applied </td></tr>
  156. <tr><td valign="top"></td><td valign="top"><em><a class="el" href="a00001.html#f1a0078e153aa99c24f9bdf0d97f67106fcf574690bbd6cf710837a169510dd7">algorithm::GTL_ERROR</a></em>&nbsp;</td><td>otherwise. </td></tr>
  157. </table>
  158. </dl>
  159. <p>Implemented in <a class="el" href="a00002.html#9da2fb7d20ef1f726ee935474302d80b">bellman_ford</a>, <a class="el" href="a00003.html#6dd7e852f7768814aafba8962befca56">bfs</a>, <a class="el" href="a00004.html#5db0b38d8d01af52720d6941103de4f2">biconnectivity</a>, <a class="el" href="a00005.html#92c6790f5ea4a7417b593342c58a953b">bid_dijkstra</a>, <a class="el" href="a00007.html#060c996e815c56cbab61f36d57fc3545">components</a>, <a class="el" href="a00008.html#908f4ea617ed59767ed334b39a2771d0">dfs</a>, <a class="el" href="a00009.html#fb4aff7134caa15dcce88668c54899aa">dijkstra</a>, <a class="el" href="a00012.html#21f4498904415ef1d88354517e7be95e">fm_partition</a>, <a class="el" href="a00015.html#b79864f21b29192bc9a81ebfa00cd262">maxflow_ff</a>, <a class="el" href="a00016.html#05bb51b4f7ab213b6624188a0e64a025">maxflow_pp</a>, <a class="el" href="a00017.html#f94644633a5cfb386de082cc02febef3">maxflow_sap</a>, <a class="el" href="a00018.html#d87b1bfbc687ad943c07538fa0c3d270">min_tree</a>, <a class="el" href="a00023.html#e06c471d957a116aad14e338c341f8b1">planarity</a>, <a class="el" href="a00025.html#c4bdc17520a51ffda1a51294ed8e83ef">ratio_cut_partition</a>, <a class="el" href="a00026.html#2aad4550b821c52d6998bff35fd8648f">st_number</a>, and <a class="el" href="a00028.html#d83c28909478d35c737a2c70506407dd">topsort</a>.</p>
  160. </div>
  161. </div><p>
  162. <a class="anchor" name="21aba63d066ae7897de6ca7d8425c408"></a><!-- doxytag: member="algorithm::reset" ref="21aba63d066ae7897de6ca7d8425c408" args="()=0" -->
  163. <div class="memitem">
  164. <div class="memproto">
  165. <table class="memname">
  166. <tr>
  167. <td class="memname">virtual void algorithm::reset </td>
  168. <td>(</td>
  169. <td class="paramname"> </td>
  170. <td>&nbsp;)&nbsp;</td>
  171. <td width="100%"><code> [pure virtual]</code></td>
  172. </tr>
  173. </table>
  174. </div>
  175. <div class="memdoc">
  176. <p>
  177. Resets algorithm.
  178. <p>
  179. Prepares the algorithm to be applied to another graph. <em>Please</em> <em>note:</em> The options an algorithm may support do <em>not</em> get reset by this. It is just to reset internally used datastructures.
  180. <p>Implemented in <a class="el" href="a00002.html#7d28afa62ce8068c4d0f2d1f96136fd6">bellman_ford</a>, <a class="el" href="a00003.html#355b797efe46ab262e71c05ba75de940">bfs</a>, <a class="el" href="a00004.html#a1a4b091fd8b2bbea2b36b91bab713af">biconnectivity</a>, <a class="el" href="a00005.html#6ed0e7e34862ca44ae4f83eb3081ae3a">bid_dijkstra</a>, <a class="el" href="a00007.html#1c1fb446e7a6bb18fbc8d2cbc82d90be">components</a>, <a class="el" href="a00008.html#1c893f699517cc72624cf171b7bc4da4">dfs</a>, <a class="el" href="a00009.html#16f9249e8cce25cbd0a3297fc8fa9a44">dijkstra</a>, <a class="el" href="a00012.html#61c77e15f54e288a192d3710ed9a2fc4">fm_partition</a>, <a class="el" href="a00015.html#8c87fccfda3fa1a320c4a280b2752ae9">maxflow_ff</a>, <a class="el" href="a00016.html#039b1c893b2197a1f3fe0586c2d3e802">maxflow_pp</a>, <a class="el" href="a00017.html#6c35136743e38cee6c31e18cf8ca20be">maxflow_sap</a>, <a class="el" href="a00018.html#3c4b17c455dd77b4120ec5564a4ac428">min_tree</a>, <a class="el" href="a00023.html#ca500e3d46a99c6231aff86afa2a71b1">planarity</a>, <a class="el" href="a00025.html#941fa7af07b89ba98454bbf31140061b">ratio_cut_partition</a>, <a class="el" href="a00026.html#e6f86706b8ae3495d3794b8c684fff0f">st_number</a>, and <a class="el" href="a00028.html#403076f952ef640cb3f52c9b1a495a1f">topsort</a>.</p>
  181. </div>
  182. </div><p>
  183. <p class="links">
  184. <a href="http://www.uni-passau.de/">University of Passau</a>
  185. &nbsp;-&nbsp;
  186. <a href="http://www.fmi.uni-passau.de/">FMI</a>
  187. &nbsp;-&nbsp;
  188. <a href="http://www.fmi.uni-passau.de/fmi/lehrstuehle/brandenburg/">Theoretical
  189. Computer Science</a>
  190. </p>
  191. <div class="copyright">
  192. Design &copy; 2002, 2003 <a href="mailto:raitner@fmi.uni-passau.de">Marcus Raitner</a>, University of Passau
  193. </div>
  194. </body>
  195. </html>