PageRenderTime 31ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/libstdc++-v3/doc/html/ext/pb_ds/sample_resize_policy.html

https://bitbucket.org/pizzafactory/pf-gcc
HTML | 413 lines | 331 code | 82 blank | 0 comment | 0 complexity | 6633a925311a120eb1976f3a7c371c5c MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <meta name="generator" content=
  6. "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
  7. <title>sample_resize_policy Interface</title>
  8. <meta http-equiv="Content-Type" content=
  9. "text/html; charset=us-ascii" />
  10. </head>
  11. <body>
  12. <div id="page">
  13. <h1><tt>sample_resize_policy</tt> Interface</h1>
  14. <p>A sample resize policy.</p>
  15. <p>This class serves to show the interface a resize policy
  16. needs to support.</p>
  17. <p>Defined in: <a href=
  18. "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp"><tt>sample_resize_policy.hpp</tt></a></p>
  19. <h2><a name="link1" id="link1">Public Types and
  20. Constants</a></h2>
  21. <h3><a name="link2" id="link2">General definitions.</a></h3>
  22. <table class="c1" width="100%" border="1" summary="Types">
  23. <tr>
  24. <td width="30%" align="left"><b>Type</b></td>
  25. <td width="55%" align="left"><b>Definition</b></td>
  26. <td width="15%" align="left"><b>Description</b></td>
  27. </tr>
  28. <tr>
  29. <td>
  30. <pre>
  31. <a name="size_type55424436" id="size_type55424436">size_type</a>
  32. </pre>
  33. </td>
  34. <td>
  35. <pre>
  36. size_t, e.g.
  37. </pre>
  38. </td>
  39. <td>
  40. <p>Size type.</p>
  41. </td>
  42. </tr>
  43. </table>
  44. <h2><a name="link3" id="link3">Public Methods</a></h2>
  45. <h3><a name="link4" id="link4">Constructors, destructor, and
  46. related.</a></h3>
  47. <table class="c1" width="100%" border="1" summary="Methods">
  48. <tr>
  49. <td width="45%" align="left"><b>Method</b></td>
  50. <td width="55%" align="left"><b>Description</b></td>
  51. </tr>
  52. <tr>
  53. <td>
  54. <pre>
  55. sample_resize_policy
  56. ()
  57. </pre>
  58. </td>
  59. <td>
  60. <p>Default constructor.</p>
  61. <p>Must be default constructable.</p>
  62. </td>
  63. </tr>
  64. <tr>
  65. <td>
  66. <pre>
  67. sample_range_hashing
  68. (<b>const</b> sample_resize_policy &amp;other)
  69. </pre>
  70. </td>
  71. <td>
  72. <p>Copy constructor.</p>
  73. <p>Must be copy constructable.</p>
  74. </td>
  75. </tr>
  76. <tr>
  77. <td>
  78. <pre>
  79. <b>inline</b> <b>void</b>
  80. swap
  81. (sample_resize_policy &amp;other)
  82. </pre>
  83. </td>
  84. <td>
  85. <p>Swaps content.</p>
  86. <p>Must be swappable (if there is such a word).</p>
  87. </td>
  88. </tr>
  89. </table>
  90. <h2><a name="link5" id="link5">Protected Methods</a></h2>
  91. <h3><a name="link6" id="link6">Insert search
  92. notifications.</a></h3>
  93. <p>Notifications called during an insert operation.</p>
  94. <table class="c1" width="100%" border="1" summary="Methods">
  95. <tr>
  96. <td width="45%" align="left"><b>Method</b></td>
  97. <td width="55%" align="left"><b>Description</b></td>
  98. </tr>
  99. <tr>
  100. <td>
  101. <pre>
  102. <b>inline</b> <b>void</b>
  103. notify_insert_search_start
  104. ()
  105. </pre>
  106. </td>
  107. <td>
  108. <p>Notifies a search started.</p>
  109. </td>
  110. </tr>
  111. <tr>
  112. <td>
  113. <pre>
  114. <b>inline</b> <b>void</b>
  115. notify_insert_search_collision
  116. ()
  117. </pre>
  118. </td>
  119. <td>
  120. <p>Notifies a search encountered a collision.</p>
  121. </td>
  122. </tr>
  123. <tr>
  124. <td>
  125. <pre>
  126. <b>inline</b> <b>void</b>
  127. notify_insert_search_end
  128. ()
  129. </pre>
  130. </td>
  131. <td>
  132. <p>Notifies a search ended.</p>
  133. </td>
  134. </tr>
  135. </table>
  136. <h3><a name="link7" id="link7">Find search
  137. notifications.</a></h3>
  138. <p>Notifications called during a find operation.</p>
  139. <table class="c1" width="100%" border="1" summary="Methods">
  140. <tr>
  141. <td width="45%" align="left"><b>Method</b></td>
  142. <td width="55%" align="left"><b>Description</b></td>
  143. </tr>
  144. <tr>
  145. <td>
  146. <pre>
  147. <b>inline</b> <b>void</b>
  148. notify_find_search_start
  149. ()
  150. </pre>
  151. </td>
  152. <td>
  153. <p>Notifies a search started.</p>
  154. </td>
  155. </tr>
  156. <tr>
  157. <td>
  158. <pre>
  159. <b>inline</b> <b>void</b>
  160. notify_find_search_collision
  161. ()
  162. </pre>
  163. </td>
  164. <td>
  165. <p>Notifies a search encountered a collision.</p>
  166. </td>
  167. </tr>
  168. <tr>
  169. <td>
  170. <pre>
  171. <b>inline</b> <b>void</b>
  172. notify_find_search_end
  173. ()
  174. </pre>
  175. </td>
  176. <td>
  177. <p>Notifies a search ended.</p>
  178. </td>
  179. </tr>
  180. </table>
  181. <h3><a name="link8" id="link8">Erase search
  182. notifications.</a></h3>
  183. <p>Notifications called during an insert operation.</p>
  184. <table class="c1" width="100%" border="1" summary="Methods">
  185. <tr>
  186. <td width="45%" align="left"><b>Method</b></td>
  187. <td width="55%" align="left"><b>Description</b></td>
  188. </tr>
  189. <tr>
  190. <td>
  191. <pre>
  192. <b>inline</b> <b>void</b>
  193. notify_erase_search_start
  194. ()
  195. </pre>
  196. </td>
  197. <td>
  198. <p>Notifies a search started.</p>
  199. </td>
  200. </tr>
  201. <tr>
  202. <td>
  203. <pre>
  204. <b>inline</b> <b>void</b>
  205. notify_erase_search_collision
  206. ()
  207. </pre>
  208. </td>
  209. <td>
  210. <p>Notifies a search encountered a collision.</p>
  211. </td>
  212. </tr>
  213. <tr>
  214. <td>
  215. <pre>
  216. <b>inline</b> <b>void</b>
  217. notify_erase_search_end
  218. ()
  219. </pre>
  220. </td>
  221. <td>
  222. <p>Notifies a search ended.</p>
  223. </td>
  224. </tr>
  225. </table>
  226. <h3><a name="link9" id="link9">Content change
  227. notifications.</a></h3>
  228. <p>Notifications called when the content of the table changes
  229. in a way that can affect the resize policy.</p>
  230. <table class="c1" width="100%" border="1" summary="Methods">
  231. <tr>
  232. <td width="45%" align="left"><b>Method</b></td>
  233. <td width="55%" align="left"><b>Description</b></td>
  234. </tr>
  235. <tr>
  236. <td>
  237. <pre>
  238. <b>inline</b> <b>void</b>
  239. notify_inserted
  240. (<a href="#size_type55424436"><tt>size_type</tt></a> num_e)
  241. </pre>
  242. </td>
  243. <td>
  244. <p>Notifies an element was inserted.</p>
  245. </td>
  246. </tr>
  247. <tr>
  248. <td>
  249. <pre>
  250. <b>inline</b> <b>void</b>
  251. notify_erased
  252. (<a href="#size_type55424436"><tt>size_type</tt></a> num_e)
  253. </pre>
  254. </td>
  255. <td>
  256. <p>Notifies an element was erased.</p>
  257. </td>
  258. </tr>
  259. <tr>
  260. <td>
  261. <pre>
  262. <b>void</b>
  263. notify_cleared
  264. ()
  265. </pre>
  266. </td>
  267. <td>
  268. <p>Notifies the table was cleared.</p>
  269. </td>
  270. </tr>
  271. </table>
  272. <h3><a name="link10" id="link10">Size change
  273. notifications.</a></h3>
  274. <p>Notifications called when the table changes size.</p>
  275. <table class="c1" width="100%" border="1" summary="Methods">
  276. <tr>
  277. <td width="45%" align="left"><b>Method</b></td>
  278. <td width="55%" align="left"><b>Description</b></td>
  279. </tr>
  280. <tr>
  281. <td>
  282. <pre>
  283. <b>void</b>
  284. notify_resized
  285. (<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
  286. </pre>
  287. </td>
  288. <td>
  289. <p>Notifies the table was resized to <span class=
  290. "c1"><tt>new_size</tt></span>.</p>
  291. </td>
  292. </tr>
  293. </table>
  294. <h3><a name="link11" id="link11">Queries.</a></h3>
  295. <p>Called to query whether/how to resize.</p>
  296. <table class="c1" width="100%" border="1" summary="Methods">
  297. <tr>
  298. <td width="45%" align="left"><b>Method</b></td>
  299. <td width="55%" align="left"><b>Description</b></td>
  300. </tr>
  301. <tr>
  302. <td>
  303. <pre>
  304. <b>inline</b> <b>bool</b>
  305. is_resize_needed
  306. () <b>const</b>
  307. </pre>
  308. </td>
  309. <td>
  310. <p>Queries whether a resize is needed.</p>
  311. </td>
  312. </tr>
  313. <tr>
  314. <td>
  315. <pre>
  316. <a href="#size_type55424436"><tt>size_type</tt></a>
  317. get_new_size
  318. (<a href="#size_type55424436"><tt>size_type</tt></a> size,
  319. <a href=
  320. "#size_type55424436"><tt>size_type</tt></a> num_used_e) <b>const</b>
  321. </pre>
  322. </td>
  323. <td>
  324. <p>Queries what the new <span class=
  325. "c1"><tt>size</tt></span> should be.</p>
  326. </td>
  327. </tr>
  328. </table>
  329. </div>
  330. </body>
  331. </html>