a00019.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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: ne_map&lt; Key, Value, Graph, Alloc &gt; Class Template 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>ne_map&lt; Key, Value, Graph, Alloc &gt; Class Template Reference</h1><!-- doxytag: class="ne_map" -->Baseclass for <a class="el" href="a00021.html" title="A specialized map with nodes as keys.">node_map</a> and <a class="el" href="a00011.html" title="A specialized map with edges as keys.">edge_map</a>.
  36. <a href="#_details">More...</a>
  37. <p>
  38. <div class="dynheader">
  39. Inheritance diagram for ne_map&lt; Key, Value, Graph, Alloc &gt;:</div>
  40. <div class="dynsection">
  41. <p><center><img src="a00174.gif" border="0" usemap="#a00175" alt="Inheritance graph"></center>
  42. <map name="a00175">
  43. <area shape="rect" href="a00011.html" title="edge_map\&lt; symlist_iterator \&gt;" alt="" coords="5,81,205,105"><area shape="rect" href="a00021.html" title="node_map\&lt; symlist \&gt;" alt="" coords="229,81,379,105"></map>
  44. <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
  45. <p>
  46. <a href="a00176.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 Member Functions</h2></td></tr>
  49. <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00019.html#4ef2ab4aebcb57a7a101975bf6a88e24">init</a> (const Graph &amp;, Value def=Value())</td></tr>
  50. <tr><td class="memItemLeft" nowrap align="right" valign="top">value_reference&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00019.html#4bcfa7ec2dcbfaa42fab93dfa81e8ab0">operator[]</a> (Key key)</td></tr>
  51. <tr><td class="memItemLeft" nowrap align="right" valign="top">const_value_reference&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00019.html#1b6fd0142573c9140de20dcc43c5aa55">operator[]</a> (Key key) const </td></tr>
  52. <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00019.html#ebe555c23769c6dcc869b5ac7fae6a9c">clear</a> ()</td></tr>
  53. <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
  54. <tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00019.html#cbe94c2209408e8af27fb9580251f360">ne_map</a> ()</td></tr>
  55. <tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00019.html#769ee373d4cd8d3ef2c1577372da149c">ne_map</a> (const Graph &amp;g, Value def=Value())</td></tr>
  56. </table>
  57. <hr><a name="_details"></a><h2>Detailed Description</h2>
  58. <h3>template&lt;class Key, class Value, class Graph, class Alloc = allocator&lt;Value&gt;&gt;<br>
  59. class ne_map&lt; Key, Value, Graph, Alloc &gt;</h3>
  60. Baseclass for <a class="el" href="a00021.html" title="A specialized map with nodes as keys.">node_map</a> and <a class="el" href="a00011.html" title="A specialized map with edges as keys.">edge_map</a>.
  61. <p>
  62. <a class="el" href="a00019.html" title="Baseclass for node_map and edge_map.">ne_map</a> is the common implementation of <code><a class="el" href="a00021.html">node_map</a> </code> and <code><a class="el" href="a00011.html">edge_map</a> </code> and cannot be used directly. <hr><h2>Constructor &amp; Destructor Documentation</h2>
  63. <a class="anchor" name="cbe94c2209408e8af27fb9580251f360"></a><!-- doxytag: member="ne_map::ne_map" ref="cbe94c2209408e8af27fb9580251f360" args="()" -->
  64. <div class="memitem">
  65. <div class="memproto">
  66. <div class="memtemplate">
  67. template&lt;class Key, class Value, class Graph, class Alloc&gt; </div>
  68. <table class="memname">
  69. <tr>
  70. <td class="memname"><a class="el" href="a00019.html">ne_map</a>&lt; Key, Value, Graph, Alloc &gt;::<a class="el" href="a00019.html">ne_map</a> </td>
  71. <td>(</td>
  72. <td class="paramname"> </td>
  73. <td>&nbsp;)&nbsp;</td>
  74. <td width="100%"><code> [inline, protected]</code></td>
  75. </tr>
  76. </table>
  77. </div>
  78. <div class="memdoc">
  79. <p>
  80. Constructs an empty <code><a class="el" href="a00019.html" title="Baseclass for node_map and edge_map.">ne_map</a></code> not associated to any <code><a class="el" href="a00014.html" title="A directed or undirected graph.">graph</a></code>.
  81. </div>
  82. </div><p>
  83. <a class="anchor" name="769ee373d4cd8d3ef2c1577372da149c"></a><!-- doxytag: member="ne_map::ne_map" ref="769ee373d4cd8d3ef2c1577372da149c" args="(const Graph &amp;g, Value def=Value())" -->
  84. <div class="memitem">
  85. <div class="memproto">
  86. <div class="memtemplate">
  87. template&lt;class Key, class Value, class Graph, class Alloc&gt; </div>
  88. <table class="memname">
  89. <tr>
  90. <td class="memname"><a class="el" href="a00019.html">ne_map</a>&lt; Key, Value, Graph, Alloc &gt;::<a class="el" href="a00019.html">ne_map</a> </td>
  91. <td>(</td>
  92. <td class="paramtype">const Graph &amp;&nbsp;</td>
  93. <td class="paramname"> <em>g</em>, </td>
  94. </tr>
  95. <tr>
  96. <td class="paramkey"></td>
  97. <td></td>
  98. <td class="paramtype">Value&nbsp;</td>
  99. <td class="paramname"> <em>def</em> = <code>Value()</code></td><td>&nbsp;</td>
  100. </tr>
  101. <tr>
  102. <td></td>
  103. <td>)</td>
  104. <td></td><td></td><td width="100%"><code> [inline, explicit, protected]</code></td>
  105. </tr>
  106. </table>
  107. </div>
  108. <div class="memdoc">
  109. <p>
  110. Constructs a <code><a class="el" href="a00019.html" title="Baseclass for node_map and edge_map.">ne_map</a></code> associated to the <code><a class="el" href="a00014.html" title="A directed or undirected graph.">graph</a> g</code>. The value associated to each key is set to <code>def</code>. You may (but need not) call <code>ne_map::init(const graph &amp;, T)</code> to associate it to a <code><a class="el" href="a00014.html" title="A directed or undirected graph.">graph</a></code>.<p>
  111. <dl compact><dt><b>Parameters:</b></dt><dd>
  112. <table border="0" cellspacing="2" cellpadding="0">
  113. <tr><td valign="top"></td><td valign="top"><em>&lt;code&gt;g&lt;/code&gt;</em>&nbsp;</td><td>associated <code><a class="el" href="a00014.html" title="A directed or undirected graph.">graph</a></code> </td></tr>
  114. <tr><td valign="top"></td><td valign="top"><em>&lt;code&gt;def&lt;/code&gt;</em>&nbsp;</td><td>default value </td></tr>
  115. </table>
  116. </dl>
  117. </div>
  118. </div><p>
  119. <hr><h2>Member Function Documentation</h2>
  120. <a class="anchor" name="4ef2ab4aebcb57a7a101975bf6a88e24"></a><!-- doxytag: member="ne_map::init" ref="4ef2ab4aebcb57a7a101975bf6a88e24" args="(const Graph &amp;, Value def=Value())" -->
  121. <div class="memitem">
  122. <div class="memproto">
  123. <div class="memtemplate">
  124. template&lt;class Key, class Value, class Graph, class Alloc&gt; </div>
  125. <table class="memname">
  126. <tr>
  127. <td class="memname">void <a class="el" href="a00019.html">ne_map</a>&lt; Key, Value, Graph, Alloc &gt;::init </td>
  128. <td>(</td>
  129. <td class="paramtype">const Graph &amp;&nbsp;</td>
  130. <td class="paramname"> <em>g</em>, </td>
  131. </tr>
  132. <tr>
  133. <td class="paramkey"></td>
  134. <td></td>
  135. <td class="paramtype">Value&nbsp;</td>
  136. <td class="paramname"> <em>def</em> = <code>Value()</code></td><td>&nbsp;</td>
  137. </tr>
  138. <tr>
  139. <td></td>
  140. <td>)</td>
  141. <td></td><td></td><td width="100%"><code> [inline]</code></td>
  142. </tr>
  143. </table>
  144. </div>
  145. <div class="memdoc">
  146. <p>
  147. Initializes the <a class="el" href="a00019.html" title="Baseclass for node_map and edge_map.">ne_map</a> to hold information for the elements of <a class="el" href="a00014.html" title="A directed or undirected graph.">graph</a> g. def is the value associated with all elements.<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>&lt;code&gt;g&lt;/code&gt;</em>&nbsp;</td><td>associated <code><a class="el" href="a00014.html" title="A directed or undirected graph.">graph</a></code> </td></tr>
  151. <tr><td valign="top"></td><td valign="top"><em>&lt;code&gt;def&lt;/code&gt;</em>&nbsp;</td><td>default value </td></tr>
  152. </table>
  153. </dl>
  154. </div>
  155. </div><p>
  156. <a class="anchor" name="4bcfa7ec2dcbfaa42fab93dfa81e8ab0"></a><!-- doxytag: member="ne_map::operator[]" ref="4bcfa7ec2dcbfaa42fab93dfa81e8ab0" args="(Key key)" -->
  157. <div class="memitem">
  158. <div class="memproto">
  159. <div class="memtemplate">
  160. template&lt;class Key, class Value, class Graph, class Alloc&gt; </div>
  161. <table class="memname">
  162. <tr>
  163. <td class="memname"><a class="el" href="a00019.html">ne_map</a>&lt; Key, Value, Graph, Alloc &gt;::value_reference <a class="el" href="a00019.html">ne_map</a>&lt; Key, Value, Graph, Alloc &gt;::operator[] </td>
  164. <td>(</td>
  165. <td class="paramtype">Key&nbsp;</td>
  166. <td class="paramname"> <em>key</em> </td>
  167. <td>&nbsp;)&nbsp;</td>
  168. <td width="100%"><code> [inline]</code></td>
  169. </tr>
  170. </table>
  171. </div>
  172. <div class="memdoc">
  173. <p>
  174. Read/write accessor function to the value associated with <code>key</code>. Use this function to change the value of an element in the <code><a class="el" href="a00019.html" title="Baseclass for node_map and edge_map.">ne_map</a></code>. Assume that <code>ne</code> is a <code><a class="el" href="a00019.html" title="Baseclass for node_map and edge_map.">ne_map</a>&lt;int&gt;</code>. Then you can assign the value 5 to <code>key</code> with: <pre>
  175. ne[key] = 5;
  176. </pre><p>
  177. If there is no entry in the <code><a class="el" href="a00019.html" title="Baseclass for node_map and edge_map.">ne_map</a></code> associated with <code>key</code>, one is created.<p>
  178. <dl compact><dt><b>Parameters:</b></dt><dd>
  179. <table border="0" cellspacing="2" cellpadding="0">
  180. <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>Key of the Entry to change </td></tr>
  181. </table>
  182. </dl>
  183. <dl class="return" compact><dt><b>Returns:</b></dt><dd>a reference to the value associated to <code>key</code>. </dd></dl>
  184. </div>
  185. </div><p>
  186. <a class="anchor" name="1b6fd0142573c9140de20dcc43c5aa55"></a><!-- doxytag: member="ne_map::operator[]" ref="1b6fd0142573c9140de20dcc43c5aa55" args="(Key key) const " -->
  187. <div class="memitem">
  188. <div class="memproto">
  189. <div class="memtemplate">
  190. template&lt;class Key, class Value, class Graph, class Alloc&gt; </div>
  191. <table class="memname">
  192. <tr>
  193. <td class="memname"><a class="el" href="a00019.html">ne_map</a>&lt; Key, Value, Graph, Alloc &gt;::const_value_reference <a class="el" href="a00019.html">ne_map</a>&lt; Key, Value, Graph, Alloc &gt;::operator[] </td>
  194. <td>(</td>
  195. <td class="paramtype">Key&nbsp;</td>
  196. <td class="paramname"> <em>key</em> </td>
  197. <td>&nbsp;)&nbsp;</td>
  198. <td width="100%"> const<code> [inline]</code></td>
  199. </tr>
  200. </table>
  201. </div>
  202. <div class="memdoc">
  203. <p>
  204. Read-only accessor function to the value associated with <code>key</code>. Use this function to read the value of an element in the <code><a class="el" href="a00019.html" title="Baseclass for node_map and edge_map.">ne_map</a></code>. Assume that <code>ne</code> is a <code><a class="el" href="a00019.html" title="Baseclass for node_map and edge_map.">ne_map</a>&lt;int&gt;</code>. Then you can print the value associated with <code>key</code> with: <pre>
  205. cout &lt;&lt; ne[key];
  206. </pre><p>
  207. <dl compact><dt><b>Parameters:</b></dt><dd>
  208. <table border="0" cellspacing="2" cellpadding="0">
  209. <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>Key of the Entry to look up </td></tr>
  210. </table>
  211. </dl>
  212. <dl class="return" compact><dt><b>Returns:</b></dt><dd>a const reference to the value associated to <code>key</code>. </dd></dl>
  213. </div>
  214. </div><p>
  215. <a class="anchor" name="ebe555c23769c6dcc869b5ac7fae6a9c"></a><!-- doxytag: member="ne_map::clear" ref="ebe555c23769c6dcc869b5ac7fae6a9c" args="()" -->
  216. <div class="memitem">
  217. <div class="memproto">
  218. <div class="memtemplate">
  219. template&lt;class Key, class Value, class Graph, class Alloc&gt; </div>
  220. <table class="memname">
  221. <tr>
  222. <td class="memname">void <a class="el" href="a00019.html">ne_map</a>&lt; Key, Value, Graph, Alloc &gt;::clear </td>
  223. <td>(</td>
  224. <td class="paramname"> </td>
  225. <td>&nbsp;)&nbsp;</td>
  226. <td width="100%"><code> [inline]</code></td>
  227. </tr>
  228. </table>
  229. </div>
  230. <div class="memdoc">
  231. <p>
  232. Erases a elements of this nodemap
  233. </div>
  234. </div><p>
  235. <p class="links">
  236. <a href="http://www.uni-passau.de/">University of Passau</a>
  237. &nbsp;-&nbsp;
  238. <a href="http://www.fmi.uni-passau.de/">FMI</a>
  239. &nbsp;-&nbsp;
  240. <a href="http://www.fmi.uni-passau.de/fmi/lehrstuehle/brandenburg/">Theoretical
  241. Computer Science</a>
  242. </p>
  243. <div class="copyright">
  244. Design &copy; 2002, 2003 <a href="mailto:raitner@fmi.uni-passau.de">Marcus Raitner</a>, University of Passau
  245. </div>
  246. </body>
  247. </html>