</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="avl_8c.html">avl.c</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="avl_8c.html">avl.c</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="avl_8h.html">avl.h</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="avl_8h.html">avl.h</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="bt_8c.html">bt.c</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="bt_8c.html">bt.c</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="bt_8h.html">bt.h</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="bt_8h.html">bt.h</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dll_8c.html">dll.c</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dll_8c.html">dll.c</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:03 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dll_8h.html">dll.h</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dll_8h.html">dll.h</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:03 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:05 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
: <a class="el" href="ht_8c.html#a81a813f472a9b689032704fca76b3ce8">ht.c</a>
, <a class="el" href="ht_8h.html#a81a813f472a9b689032704fca76b3ce8">ht.h</a>
</li>
+<li>ht_find()
+: <a class="el" href="ht_8h.html#a50855610a2e434aeec5180aa596d44a1">ht.h</a>
+</li>
<li>ht_free()
-: <a class="el" href="ht_8h.html#a96de71bf3880ed0a879f60b6e5254803">ht.h</a>
-, <a class="el" href="ht_8c.html#a96de71bf3880ed0a879f60b6e5254803">ht.c</a>
+: <a class="el" href="ht_8c.html#a96de71bf3880ed0a879f60b6e5254803">ht.c</a>
+, <a class="el" href="ht_8h.html#a96de71bf3880ed0a879f60b6e5254803">ht.h</a>
</li>
<li>ht_get()
: <a class="el" href="ht_8c.html#a5bc0ba0d31b944797e17a96372bce33e">ht.c</a>
-, <a class="el" href="ht_8h.html#a5bc0ba0d31b944797e17a96372bce33e">ht.h</a>
</li>
<li>ht_hash_func
: <a class="el" href="ht_8h.html#a91a8d03489ef281e6f26d389c44d42cf">ht.h</a>
: <a class="el" href="ht_8c.html#a278174a0154a10b8b10b23937ca4c721">ht.c</a>
, <a class="el" href="ht_8h.html#a278174a0154a10b8b10b23937ca4c721">ht.h</a>
</li>
+<li>ht_insert()
+: <a class="el" href="ht_8h.html#acb11ccfcef6f11d5e9ec31f14b875140">ht.h</a>
+</li>
<li>ht_new()
: <a class="el" href="ht_8c.html#a0a3e03a29413673acd8899d250cd0844">ht.c</a>
, <a class="el" href="ht_8h.html#a0a3e03a29413673acd8899d250cd0844">ht.h</a>
</li>
<li>ht_put()
: <a class="el" href="ht_8c.html#a8c17c7288d2f510dd5c091cccc6dd056">ht.c</a>
-, <a class="el" href="ht_8h.html#a8c17c7288d2f510dd5c091cccc6dd056">ht.h</a>
</li>
<li>ht_resize()
-: <a class="el" href="ht_8h.html#ad9cac6da8b459d5960079b0d95489960">ht.h</a>
-, <a class="el" href="ht_8c.html#ad9cac6da8b459d5960079b0d95489960">ht.c</a>
+: <a class="el" href="ht_8c.html#ad9cac6da8b459d5960079b0d95489960">ht.c</a>
+, <a class="el" href="ht_8h.html#ad9cac6da8b459d5960079b0d95489960">ht.h</a>
</li>
</ul>
</li>
<li>sll_pop_back()
: <a class="el" href="sll_8c.html#af72e93329186ac936d2bf6f544aa1f6b">sll.c</a>
-, <a class="el" href="sll_8h.html#af72e93329186ac936d2bf6f544aa1f6b">sll.h</a>
+, <a class="el" href="sll_8h.html#a58add98a437335c8f927344215a40d11">sll.h</a>
</li>
<li>sll_pop_front()
: <a class="el" href="sll_8c.html#a1588e5a1f90852ee48403d5313d64269">sll.c</a>
-, <a class="el" href="sll_8h.html#a1588e5a1f90852ee48403d5313d64269">sll.h</a>
+, <a class="el" href="sll_8h.html#a6702f6f18b540bd21165295eb3ca5c25">sll.h</a>
</li>
<li>sll_push_back()
: <a class="el" href="sll_8h.html#a19ad0a86a87451a3ab68ad6d18c3e3e0">sll.h</a>
</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:05 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
: <a class="el" href="ht_8c.html#a81a813f472a9b689032704fca76b3ce8">ht.c</a>
, <a class="el" href="ht_8h.html#a81a813f472a9b689032704fca76b3ce8">ht.h</a>
</li>
+<li>ht_find()
+: <a class="el" href="ht_8h.html#a50855610a2e434aeec5180aa596d44a1">ht.h</a>
+</li>
<li>ht_free()
-: <a class="el" href="ht_8h.html#a96de71bf3880ed0a879f60b6e5254803">ht.h</a>
-, <a class="el" href="ht_8c.html#a96de71bf3880ed0a879f60b6e5254803">ht.c</a>
+: <a class="el" href="ht_8c.html#a96de71bf3880ed0a879f60b6e5254803">ht.c</a>
+, <a class="el" href="ht_8h.html#a96de71bf3880ed0a879f60b6e5254803">ht.h</a>
</li>
<li>ht_get()
: <a class="el" href="ht_8c.html#a5bc0ba0d31b944797e17a96372bce33e">ht.c</a>
-, <a class="el" href="ht_8h.html#a5bc0ba0d31b944797e17a96372bce33e">ht.h</a>
</li>
<li>ht_hash_string()
: <a class="el" href="ht_8h.html#a278174a0154a10b8b10b23937ca4c721">ht.h</a>
, <a class="el" href="ht_8c.html#a278174a0154a10b8b10b23937ca4c721">ht.c</a>
</li>
+<li>ht_insert()
+: <a class="el" href="ht_8h.html#acb11ccfcef6f11d5e9ec31f14b875140">ht.h</a>
+</li>
<li>ht_new()
-: <a class="el" href="ht_8c.html#a0a3e03a29413673acd8899d250cd0844">ht.c</a>
-, <a class="el" href="ht_8h.html#a0a3e03a29413673acd8899d250cd0844">ht.h</a>
+: <a class="el" href="ht_8h.html#a0a3e03a29413673acd8899d250cd0844">ht.h</a>
+, <a class="el" href="ht_8c.html#a0a3e03a29413673acd8899d250cd0844">ht.c</a>
</li>
<li>ht_put()
: <a class="el" href="ht_8c.html#a8c17c7288d2f510dd5c091cccc6dd056">ht.c</a>
-, <a class="el" href="ht_8h.html#a8c17c7288d2f510dd5c091cccc6dd056">ht.h</a>
</li>
<li>ht_resize()
-: <a class="el" href="ht_8h.html#ad9cac6da8b459d5960079b0d95489960">ht.h</a>
-, <a class="el" href="ht_8c.html#ad9cac6da8b459d5960079b0d95489960">ht.c</a>
+: <a class="el" href="ht_8c.html#ad9cac6da8b459d5960079b0d95489960">ht.c</a>
+, <a class="el" href="ht_8h.html#ad9cac6da8b459d5960079b0d95489960">ht.h</a>
</li>
</ul>
</li>
<li>sll_pop_back()
: <a class="el" href="sll_8c.html#af72e93329186ac936d2bf6f544aa1f6b">sll.c</a>
-, <a class="el" href="sll_8h.html#af72e93329186ac936d2bf6f544aa1f6b">sll.h</a>
+, <a class="el" href="sll_8h.html#a58add98a437335c8f927344215a40d11">sll.h</a>
</li>
<li>sll_pop_front()
: <a class="el" href="sll_8c.html#a1588e5a1f90852ee48403d5313d64269">sll.c</a>
-, <a class="el" href="sll_8h.html#a1588e5a1f90852ee48403d5313d64269">sll.h</a>
+, <a class="el" href="sll_8h.html#a6702f6f18b540bd21165295eb3ca5c25">sll.h</a>
</li>
<li>sll_push_back()
: <a class="el" href="sll_8c.html#a19ad0a86a87451a3ab68ad6d18c3e3e0">sll.c</a>
</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:05 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:05 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:05 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8c.html#a278174a0154a10b8b10b23937ca4c721">ht_hash_string</a> (void *key)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Takes a string key value and returns it's hashed value. <a href="#a278174a0154a10b8b10b23937ca4c721"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structht__table.html">ht_table</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8c.html#a0a3e03a29413673acd8899d250cd0844">ht_new</a> (unsigned int size, <a class="el" href="ht_8h.html#a91a8d03489ef281e6f26d389c44d42cf">ht_hash_func</a> fn)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new hash table of the given size using the provided hash function or the built-in string hashing function otherwise. <a href="#a0a3e03a29413673acd8899d250cd0844"></a><br/></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new hash table. <a href="#a0a3e03a29413673acd8899d250cd0844"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8c.html#a96de71bf3880ed0a879f60b6e5254803">ht_free</a> (<a class="el" href="structht__table.html">ht_table</a> *table, int free_key, int free_value)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Frees all memory used by the provided hash table. <a href="#a96de71bf3880ed0a879f60b6e5254803"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8c.html#a8c17c7288d2f510dd5c091cccc6dd056">ht_put</a> (<a class="el" href="structht__table.html">ht_table</a> *table, void *key, void *val)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Inserts a key/value pair into the provided table. <a href="#a8c17c7288d2f510dd5c091cccc6dd056"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8c.html#a5bc0ba0d31b944797e17a96372bce33e">ht_get</a> (<a class="el" href="structht__table.html">ht_table</a> *table, void *key)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves a value from the provided table. <a href="#a5bc0ba0d31b944797e17a96372bce33e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8c.html#a81a813f472a9b689032704fca76b3ce8">ht_delete</a> (<a class="el" href="structht__table.html">ht_table</a> *table, void *key, int free_key, int free_value)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Deletes a key/value pair from the provided hash table. <a href="#a81a813f472a9b689032704fca76b3ce8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structht__table.html">ht_table</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8c.html#ad9cac6da8b459d5960079b0d95489960">ht_resize</a> (<a class="el" href="structht__table.html">ht_table</a> *table, unsigned int size)</td></tr>
<div class="memdoc">
<p>Deletes a key/value pair from the provided hash table. </p>
+<p>This function looks up an entry in the table by hashing the key with the table's hash function. If an entry is found then the memory allocated for the entry is freed. If free_key or free_value are non-zero values then the key or value pointers are freed respectively.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">table</td><td>The table from which the key/value pait will be deleted. </td></tr>
<div class="memdoc">
<p>Frees all memory used by the provided hash table. </p>
+<p>This function frees all memory allocated for the given table. If free_key or free_value are non-zero values then the key or value pointers are freed respectively.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">table</td><td>The table to be freed. </td></tr>
</div>
<div class="memdoc">
-<p>Retrieves a value from the provided table. </p>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table class="params">
- <tr><td class="paramname">table</td><td>The table in which to find the associated value. </td></tr>
- <tr><td class="paramname">key</td><td>The key to lookup.</td></tr>
- </table>
- </dd>
-</dl>
-<dl class="return"><dt><b>Returns:</b></dt><dd>A pointer to the value associated with the provided key. </dd></dl>
-
<p>Definition at line <a class="el" href="ht_8c_source.html#l00108">108</a> of file <a class="el" href="ht_8c_source.html">ht.c</a>.</p>
</div>
<div class="memdoc">
<p>Takes a string key value and returns it's hashed value. </p>
+<p>This function takes a pointer to a string and returns a hash value based on the contents of the string.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">key</td><td>Pointer to the string to hash.</td></tr>
<div class="dyncontent">
<div class="center"><img src="ht_8c_a278174a0154a10b8b10b23937ca4c721_icgraph.png" border="0" usemap="#ht_8c_a278174a0154a10b8b10b23937ca4c721_icgraph" alt=""/></div>
<map name="ht_8c_a278174a0154a10b8b10b23937ca4c721_icgraph" id="ht_8c_a278174a0154a10b8b10b23937ca4c721_icgraph">
-<area shape="rect" id="node3" href="ht_8h.html#a0a3e03a29413673acd8899d250cd0844" title="Creates a new hash table of the given size using the provided hash function or the built-in string ha..." alt="" coords="161,5,223,35"/>\r</map>
+<area shape="rect" id="node3" href="ht_8h.html#a0a3e03a29413673acd8899d250cd0844" title="Creates a new hash table." alt="" coords="161,5,223,35"/>\r</map>
</div>
</p>
</div>
<div class="memdoc">
-<p>Creates a new hash table of the given size using the provided hash function or the built-in string hashing function otherwise. </p>
+<p>Creates a new hash table. </p>
+<p>This fucntion creates a new empty hash table with an internal lookup table of the given size and the desired hash function. The hash function will be used for insertion, deletion, and lookup of elements within the table. If the hash function pointer is null then ht_hash_string is used.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">size</td><td>The size of the table to use for storing data. </td></tr>
</div>
<div class="memdoc">
-<p>Inserts a key/value pair into the provided table. </p>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table class="params">
- <tr><td class="paramname">table</td><td>The table to be freed. </td></tr>
- <tr><td class="paramname">key</td><td>The key for the associated value. </td></tr>
- <tr><td class="paramname">val</td><td>The value to be associated with the key. </td></tr>
- </table>
- </dd>
-</dl>
-
<p>Definition at line <a class="el" href="ht_8c_source.html#l00073">73</a> of file <a class="el" href="ht_8c_source.html">ht.c</a>.</p>
</div>
<div class="memdoc">
<p>Resizes the underlying table used for storing key/value pairs. </p>
+<p>This function allocates a new internal lookup table of the given size to replace the internal table for the provided hash table. After the new talbe is created, all entries from the old table are rehahsed and inserted into the new lookup table. The new lookup table then replaces the old lookup table and the old lookup table is freed.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">table</td><td>The table to be resized. </td></tr>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="ht_8c.html">ht.c</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<map id="G" name="G">
-<area shape="rect" id="node3" href="$ht_8h.html#a0a3e03a29413673acd8899d250cd0844" title="Creates a new hash table of the given size using the provided hash function or the built-in string ha..." alt="" coords="161,5,223,35"/>
+<area shape="rect" id="node3" href="$ht_8h.html#a0a3e03a29413673acd8899d250cd0844" title="Creates a new hash table." alt="" coords="161,5,223,35"/>
</map>
-c6c1dd045d4a706b458e14b275afbca8
\ No newline at end of file
+a664916197e72d71cb6ce0dfa272dc10
\ No newline at end of file
<a name="l00041"></a>00041 <span class="keywordflow">return</span> hash;
<a name="l00042"></a>00042 }
<a name="l00043"></a>00043
-<a name="l00044"></a><a class="code" href="ht_8h.html#a0a3e03a29413673acd8899d250cd0844">00044</a> <a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* <a class="code" href="ht_8c.html#a0a3e03a29413673acd8899d250cd0844" title="Creates a new hash table of the given size using the provided hash function or the built-in string ha...">ht_new</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size, <a class="code" href="ht_8h.html#a91a8d03489ef281e6f26d389c44d42cf" title="Hash function for hashing keys in a hash table.">ht_hash_func</a> fn)
+<a name="l00044"></a><a class="code" href="ht_8h.html#a0a3e03a29413673acd8899d250cd0844">00044</a> <a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* <a class="code" href="ht_8c.html#a0a3e03a29413673acd8899d250cd0844" title="Creates a new hash table.">ht_new</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size, <a class="code" href="ht_8h.html#a91a8d03489ef281e6f26d389c44d42cf" title="Hash function for hashing keys in a hash table.">ht_hash_func</a> fn)
<a name="l00045"></a>00045 {
<a name="l00046"></a>00046 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> table_size = size * <span class="keyword">sizeof</span>(<a class="code" href="structht__node.html" title="A node in a hash table.">ht_node</a>*);
<a name="l00047"></a>00047 <a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table = (<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>*) malloc( <span class="keyword">sizeof</span>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>) );
<a name="l00070"></a>00070 }
<a name="l00071"></a>00071 }
<a name="l00072"></a>00072
-<a name="l00073"></a><a class="code" href="ht_8h.html#a8c17c7288d2f510dd5c091cccc6dd056">00073</a> <span class="keywordtype">void</span> <a class="code" href="ht_8c.html#a8c17c7288d2f510dd5c091cccc6dd056" title="Inserts a key/value pair into the provided table.">ht_put</a>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table, <span class="keywordtype">void</span>* key, <span class="keywordtype">void</span>* val)
+<a name="l00073"></a><a class="code" href="ht_8c.html#a8c17c7288d2f510dd5c091cccc6dd056">00073</a> <span class="keywordtype">void</span> <a class="code" href="ht_8c.html#a8c17c7288d2f510dd5c091cccc6dd056">ht_put</a>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table, <span class="keywordtype">void</span>* key, <span class="keywordtype">void</span>* val)
<a name="l00074"></a>00074 {
<a name="l00075"></a>00075 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index = table-><a class="code" href="structht__table.html#abe53fe8d261dea812255944769d22f45" title="Function used for hashing elements.">hash_func</a>( key ) % table-><a class="code" href="structht__table.html#a493b0baf20b4274a08b5451e61f8e5f4" title="Size of the internal table.">size</a>;
<a name="l00076"></a>00076 <a class="code" href="structht__node.html" title="A node in a hash table.">ht_node</a>* cur = table-><a class="code" href="structht__table.html#ae739f6f0d8b6cd6f55337ae7d0761dfc" title="Pointer to the internal hashing table.">table</a>[index];
<a name="l00105"></a>00105 }
<a name="l00106"></a>00106 }
<a name="l00107"></a>00107
-<a name="l00108"></a><a class="code" href="ht_8h.html#a5bc0ba0d31b944797e17a96372bce33e">00108</a> <span class="keywordtype">void</span>* <a class="code" href="ht_8c.html#a5bc0ba0d31b944797e17a96372bce33e" title="Retrieves a value from the provided table.">ht_get</a>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table, <span class="keywordtype">void</span>* key)
+<a name="l00108"></a><a class="code" href="ht_8c.html#a5bc0ba0d31b944797e17a96372bce33e">00108</a> <span class="keywordtype">void</span>* <a class="code" href="ht_8c.html#a5bc0ba0d31b944797e17a96372bce33e">ht_get</a>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table, <span class="keywordtype">void</span>* key)
<a name="l00109"></a>00109 {
<a name="l00110"></a>00110 <span class="keywordtype">void</span>* ret = NULL;
<a name="l00111"></a>00111 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index= table-><a class="code" href="structht__table.html#abe53fe8d261dea812255944769d22f45" title="Function used for hashing elements.">hash_func</a>( key ) % table-><a class="code" href="structht__table.html#a493b0baf20b4274a08b5451e61f8e5f4" title="Size of the internal table.">size</a>;
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="ht_8c.html">ht.c</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:03 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8h.html#a278174a0154a10b8b10b23937ca4c721">ht_hash_string</a> (void *key)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Takes a string key value and returns it's hashed value. <a href="#a278174a0154a10b8b10b23937ca4c721"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structht__table.html">ht_table</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8h.html#a0a3e03a29413673acd8899d250cd0844">ht_new</a> (unsigned int size, <a class="el" href="ht_8h.html#a91a8d03489ef281e6f26d389c44d42cf">ht_hash_func</a> fn)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new hash table of the given size using the provided hash function or the built-in string hashing function otherwise. <a href="#a0a3e03a29413673acd8899d250cd0844"></a><br/></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new hash table. <a href="#a0a3e03a29413673acd8899d250cd0844"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8h.html#a96de71bf3880ed0a879f60b6e5254803">ht_free</a> (<a class="el" href="structht__table.html">ht_table</a> *table, int free_key, int free_value)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Frees all memory used by the provided hash table. <a href="#a96de71bf3880ed0a879f60b6e5254803"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8h.html#a8c17c7288d2f510dd5c091cccc6dd056">ht_put</a> (<a class="el" href="structht__table.html">ht_table</a> *table, void *key, void *val)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Inserts a key/value pair into the provided table. <a href="#a8c17c7288d2f510dd5c091cccc6dd056"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8h.html#a5bc0ba0d31b944797e17a96372bce33e">ht_get</a> (<a class="el" href="structht__table.html">ht_table</a> *table, void *key)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves a value from the provided table. <a href="#a5bc0ba0d31b944797e17a96372bce33e"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8h.html#acb11ccfcef6f11d5e9ec31f14b875140">ht_insert</a> (<a class="el" href="structht__table.html">ht_table</a> *table, void *key, void *val)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Inserts a key/value pair into the provided table. <a href="#acb11ccfcef6f11d5e9ec31f14b875140"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8h.html#a50855610a2e434aeec5180aa596d44a1">ht_find</a> (<a class="el" href="structht__table.html">ht_table</a> *table, void *key)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves a value from the provided table. <a href="#a50855610a2e434aeec5180aa596d44a1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8h.html#a81a813f472a9b689032704fca76b3ce8">ht_delete</a> (<a class="el" href="structht__table.html">ht_table</a> *table, void *key, int free_key, int free_value)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Deletes a key/value pair from the provided hash table. <a href="#a81a813f472a9b689032704fca76b3ce8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structht__table.html">ht_table</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="ht_8h.html#ad9cac6da8b459d5960079b0d95489960">ht_resize</a> (<a class="el" href="structht__table.html">ht_table</a> *table, unsigned int size)</td></tr>
<div class="memdoc">
<p>Deletes a key/value pair from the provided hash table. </p>
+<p>This function looks up an entry in the table by hashing the key with the table's hash function. If an entry is found then the memory allocated for the entry is freed. If free_key or free_value are non-zero values then the key or value pointers are freed respectively.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">table</td><td>The table from which the key/value pait will be deleted. </td></tr>
</div>
</div>
-<a class="anchor" id="a96de71bf3880ed0a879f60b6e5254803"></a><!-- doxytag: member="ht.h::ht_free" ref="a96de71bf3880ed0a879f60b6e5254803" args="(ht_table *table, int free_key, int free_value)" -->
+<a class="anchor" id="a50855610a2e434aeec5180aa596d44a1"></a><!-- doxytag: member="ht.h::ht_find" ref="a50855610a2e434aeec5180aa596d44a1" args="(ht_table *table, void *key)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">void ht_free </td>
+ <td class="memname">void* ht_find </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structht__table.html">ht_table</a> * </td>
<td class="paramname"><em>table</em>, </td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>free_key</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>free_value</em> </td>
+ <td class="paramtype">void * </td>
+ <td class="paramname"><em>key</em> </td>
</tr>
<tr>
<td></td>
</div>
<div class="memdoc">
-<p>Frees all memory used by the provided hash table. </p>
+<p>Retrieves a value from the provided table. </p>
+<p>This function looks up an entry in the table by hashing the key with the table's hash function. It then returns the pointer to the value of the found entry or a null pointer if no entry was found.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">table</td><td>The table to be freed. </td></tr>
- <tr><td class="paramname">free_key</td><td>Determines whether the key pointers will be freed. </td></tr>
- <tr><td class="paramname">free_value</td><td>Determines whether the value pointers will be freed. </td></tr>
+ <tr><td class="paramname">table</td><td>The table in which to find the associated value. </td></tr>
+ <tr><td class="paramname">key</td><td>The key to lookup.</td></tr>
</table>
</dd>
</dl>
-
-<p>Definition at line <a class="el" href="ht_8c_source.html#l00055">55</a> of file <a class="el" href="ht_8c_source.html">ht.c</a>.</p>
+<dl class="return"><dt><b>Returns:</b></dt><dd>A pointer to the value associated with the provided key. </dd></dl>
</div>
</div>
-<a class="anchor" id="a5bc0ba0d31b944797e17a96372bce33e"></a><!-- doxytag: member="ht.h::ht_get" ref="a5bc0ba0d31b944797e17a96372bce33e" args="(ht_table *table, void *key)" -->
+<a class="anchor" id="a96de71bf3880ed0a879f60b6e5254803"></a><!-- doxytag: member="ht.h::ht_free" ref="a96de71bf3880ed0a879f60b6e5254803" args="(ht_table *table, int free_key, int free_value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">void* ht_get </td>
+ <td class="memname">void ht_free </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structht__table.html">ht_table</a> * </td>
<td class="paramname"><em>table</em>, </td>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>key</em> </td>
+ <td class="paramtype">int </td>
+ <td class="paramname"><em>free_key</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int </td>
+ <td class="paramname"><em>free_value</em> </td>
</tr>
<tr>
<td></td>
</div>
<div class="memdoc">
-<p>Retrieves a value from the provided table. </p>
+<p>Frees all memory used by the provided hash table. </p>
+<p>This function frees all memory allocated for the given table. If free_key or free_value are non-zero values then the key or value pointers are freed respectively.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">table</td><td>The table in which to find the associated value. </td></tr>
- <tr><td class="paramname">key</td><td>The key to lookup.</td></tr>
+ <tr><td class="paramname">table</td><td>The table to be freed. </td></tr>
+ <tr><td class="paramname">free_key</td><td>Determines whether the key pointers will be freed. </td></tr>
+ <tr><td class="paramname">free_value</td><td>Determines whether the value pointers will be freed. </td></tr>
</table>
</dd>
</dl>
-<dl class="return"><dt><b>Returns:</b></dt><dd>A pointer to the value associated with the provided key. </dd></dl>
-<p>Definition at line <a class="el" href="ht_8c_source.html#l00108">108</a> of file <a class="el" href="ht_8c_source.html">ht.c</a>.</p>
+<p>Definition at line <a class="el" href="ht_8c_source.html#l00055">55</a> of file <a class="el" href="ht_8c_source.html">ht.c</a>.</p>
</div>
</div>
<div class="memdoc">
<p>Takes a string key value and returns it's hashed value. </p>
+<p>This function takes a pointer to a string and returns a hash value based on the contents of the string.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">key</td><td>Pointer to the string to hash.</td></tr>
<div class="dyncontent">
<div class="center"><img src="ht_8h_a278174a0154a10b8b10b23937ca4c721_icgraph.png" border="0" usemap="#ht_8h_a278174a0154a10b8b10b23937ca4c721_icgraph" alt=""/></div>
<map name="ht_8h_a278174a0154a10b8b10b23937ca4c721_icgraph" id="ht_8h_a278174a0154a10b8b10b23937ca4c721_icgraph">
-<area shape="rect" id="node3" href="ht_8h.html#a0a3e03a29413673acd8899d250cd0844" title="Creates a new hash table of the given size using the provided hash function or the built-in string ha..." alt="" coords="161,5,223,35"/>\r</map>
+<area shape="rect" id="node3" href="ht_8h.html#a0a3e03a29413673acd8899d250cd0844" title="Creates a new hash table." alt="" coords="161,5,223,35"/>\r</map>
</div>
</p>
</div>
</div>
-<a class="anchor" id="a0a3e03a29413673acd8899d250cd0844"></a><!-- doxytag: member="ht.h::ht_new" ref="a0a3e03a29413673acd8899d250cd0844" args="(unsigned int size, ht_hash_func fn)" -->
+<a class="anchor" id="acb11ccfcef6f11d5e9ec31f14b875140"></a><!-- doxytag: member="ht.h::ht_insert" ref="acb11ccfcef6f11d5e9ec31f14b875140" args="(ht_table *table, void *key, void *val)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname"><a class="el" href="structht__table.html">ht_table</a>* ht_new </td>
+ <td class="memname">void ht_insert </td>
<td>(</td>
- <td class="paramtype">unsigned int </td>
- <td class="paramname"><em>size</em>, </td>
+ <td class="paramtype"><a class="el" href="structht__table.html">ht_table</a> * </td>
+ <td class="paramname"><em>table</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype"><a class="el" href="ht_8h.html#a91a8d03489ef281e6f26d389c44d42cf">ht_hash_func</a> </td>
- <td class="paramname"><em>fn</em> </td>
+ <td class="paramtype">void * </td>
+ <td class="paramname"><em>key</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">void * </td>
+ <td class="paramname"><em>val</em> </td>
</tr>
<tr>
<td></td>
</div>
<div class="memdoc">
-<p>Creates a new hash table of the given size using the provided hash function or the built-in string hashing function otherwise. </p>
+<p>Inserts a key/value pair into the provided table. </p>
+<p>This function inserts a new entry into the provided table containing the provided key and value pointers. The entry is placed in the table by hashing the key with the provided table's hash function. If an entry with an identical key exists, then the value pointer for that entry is changed to the provided value pointer. If free_value is a non-zero value then the old value pointer is also freed.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">size</td><td>The size of the table to use for storing data. </td></tr>
- <tr><td class="paramname">fn</td><td>The function to use for hasing keys.</td></tr>
+ <tr><td class="paramname">table</td><td>The table to be freed. </td></tr>
+ <tr><td class="paramname">key</td><td>The key for the associated value. </td></tr>
+ <tr><td class="paramname">val</td><td>The value to be associated with the key. </td></tr>
+ <tr><td class="paramname">free_value</td><td>Determines whether or not to free the old value pointer. </td></tr>
</table>
</dd>
</dl>
-<dl class="return"><dt><b>Returns:</b></dt><dd>The newly created table. </dd></dl>
-
-<p>Definition at line <a class="el" href="ht_8c_source.html#l00044">44</a> of file <a class="el" href="ht_8c_source.html">ht.c</a>.</p>
-
-<p><div class="dynheader">
-Here is the call graph for this function:</div>
-<div class="dyncontent">
-<div class="center"><img src="ht_8h_a0a3e03a29413673acd8899d250cd0844_cgraph.png" border="0" usemap="#ht_8h_a0a3e03a29413673acd8899d250cd0844_cgraph" alt=""/></div>
-<map name="ht_8h_a0a3e03a29413673acd8899d250cd0844_cgraph" id="ht_8h_a0a3e03a29413673acd8899d250cd0844_cgraph">
-<area shape="rect" id="node3" href="ht_8c.html#a278174a0154a10b8b10b23937ca4c721" title="Takes a string key value and returns it's hashed value." alt="" coords="117,5,224,35"/>\r</map>
-</div>
-</p>
</div>
</div>
-<a class="anchor" id="a8c17c7288d2f510dd5c091cccc6dd056"></a><!-- doxytag: member="ht.h::ht_put" ref="a8c17c7288d2f510dd5c091cccc6dd056" args="(ht_table *table, void *key, void *val)" -->
+<a class="anchor" id="a0a3e03a29413673acd8899d250cd0844"></a><!-- doxytag: member="ht.h::ht_new" ref="a0a3e03a29413673acd8899d250cd0844" args="(unsigned int size, ht_hash_func fn)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">void ht_put </td>
+ <td class="memname"><a class="el" href="structht__table.html">ht_table</a>* ht_new </td>
<td>(</td>
- <td class="paramtype"><a class="el" href="structht__table.html">ht_table</a> * </td>
- <td class="paramname"><em>table</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>key</em>, </td>
+ <td class="paramtype">unsigned int </td>
+ <td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>val</em> </td>
+ <td class="paramtype"><a class="el" href="ht_8h.html#a91a8d03489ef281e6f26d389c44d42cf">ht_hash_func</a> </td>
+ <td class="paramname"><em>fn</em> </td>
</tr>
<tr>
<td></td>
</div>
<div class="memdoc">
-<p>Inserts a key/value pair into the provided table. </p>
+<p>Creates a new hash table. </p>
+<p>This fucntion creates a new empty hash table with an internal lookup table of the given size and the desired hash function. The hash function will be used for insertion, deletion, and lookup of elements within the table. If the hash function pointer is null then ht_hash_string is used.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">table</td><td>The table to be freed. </td></tr>
- <tr><td class="paramname">key</td><td>The key for the associated value. </td></tr>
- <tr><td class="paramname">val</td><td>The value to be associated with the key. </td></tr>
+ <tr><td class="paramname">size</td><td>The size of the table to use for storing data. </td></tr>
+ <tr><td class="paramname">fn</td><td>The function to use for hasing keys.</td></tr>
</table>
</dd>
</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The newly created table. </dd></dl>
-<p>Definition at line <a class="el" href="ht_8c_source.html#l00073">73</a> of file <a class="el" href="ht_8c_source.html">ht.c</a>.</p>
+<p>Definition at line <a class="el" href="ht_8c_source.html#l00044">44</a> of file <a class="el" href="ht_8c_source.html">ht.c</a>.</p>
+
+<p><div class="dynheader">
+Here is the call graph for this function:</div>
+<div class="dyncontent">
+<div class="center"><img src="ht_8h_a0a3e03a29413673acd8899d250cd0844_cgraph.png" border="0" usemap="#ht_8h_a0a3e03a29413673acd8899d250cd0844_cgraph" alt=""/></div>
+<map name="ht_8h_a0a3e03a29413673acd8899d250cd0844_cgraph" id="ht_8h_a0a3e03a29413673acd8899d250cd0844_cgraph">
+<area shape="rect" id="node3" href="ht_8c.html#a278174a0154a10b8b10b23937ca4c721" title="Takes a string key value and returns it's hashed value." alt="" coords="117,5,224,35"/>\r</map>
+</div>
+</p>
</div>
</div>
<div class="memdoc">
<p>Resizes the underlying table used for storing key/value pairs. </p>
+<p>This function allocates a new internal lookup table of the given size to replace the internal table for the provided hash table. After the new talbe is created, all entries from the old table are rehahsed and inserted into the new lookup table. The new lookup table then replaces the old lookup table and the old lookup table is freed.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">table</td><td>The table to be resized. </td></tr>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="ht_8h.html">ht.h</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<map id="G" name="G">
-<area shape="rect" id="node3" href="$ht_8h.html#a0a3e03a29413673acd8899d250cd0844" title="Creates a new hash table of the given size using the provided hash function or the built-in string ha..." alt="" coords="161,5,223,35"/>
+<area shape="rect" id="node3" href="$ht_8h.html#a0a3e03a29413673acd8899d250cd0844" title="Creates a new hash table." alt="" coords="161,5,223,35"/>
</map>
-c6c1dd045d4a706b458e14b275afbca8
\ No newline at end of file
+a664916197e72d71cb6ce0dfa272dc10
\ No newline at end of file
<a name="l00052"></a><a class="code" href="structht__table.html#abe53fe8d261dea812255944769d22f45">00052</a> <a class="code" href="ht_8h.html#a91a8d03489ef281e6f26d389c44d42cf" title="Hash function for hashing keys in a hash table.">ht_hash_func</a> <a class="code" href="structht__table.html#abe53fe8d261dea812255944769d22f45" title="Function used for hashing elements.">hash_func</a>;
<a name="l00053"></a>00053 } <a class="code" href="structht__table.html" title="A hash table.">ht_table</a>;
<a name="l00054"></a>00054
-<a name="l00062"></a>00062 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="ht_8c.html#a278174a0154a10b8b10b23937ca4c721" title="Takes a string key value and returns it&#39;s hashed value.">ht_hash_string</a>(<span class="keywordtype">void</span>* key);
-<a name="l00063"></a>00063
-<a name="l00073"></a>00073 <a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* <a class="code" href="ht_8c.html#a0a3e03a29413673acd8899d250cd0844" title="Creates a new hash table of the given size using the provided hash function or the built-in string ha...">ht_new</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size, <a class="code" href="ht_8h.html#a91a8d03489ef281e6f26d389c44d42cf" title="Hash function for hashing keys in a hash table.">ht_hash_func</a> fn);
-<a name="l00074"></a>00074
-<a name="l00082"></a>00082 <span class="keywordtype">void</span> <a class="code" href="ht_8c.html#a96de71bf3880ed0a879f60b6e5254803" title="Frees all memory used by the provided hash table.">ht_free</a>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table, <span class="keywordtype">int</span> free_key, <span class="keywordtype">int</span> free_value);
-<a name="l00083"></a>00083
-<a name="l00091"></a>00091 <span class="keywordtype">void</span> <a class="code" href="ht_8c.html#a8c17c7288d2f510dd5c091cccc6dd056" title="Inserts a key/value pair into the provided table.">ht_put</a>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table, <span class="keywordtype">void</span>* key, <span class="keywordtype">void</span>* val);
-<a name="l00092"></a>00092
-<a name="l00101"></a>00101 <span class="keywordtype">void</span>* <a class="code" href="ht_8c.html#a5bc0ba0d31b944797e17a96372bce33e" title="Retrieves a value from the provided table.">ht_get</a>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table, <span class="keywordtype">void</span>* key);
-<a name="l00102"></a>00102
-<a name="l00111"></a>00111 <span class="keywordtype">void</span> <a class="code" href="ht_8c.html#a81a813f472a9b689032704fca76b3ce8" title="Deletes a key/value pair from the provided hash table.">ht_delete</a>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table, <span class="keywordtype">void</span>* key, <span class="keywordtype">int</span> free_key, <span class="keywordtype">int</span> free_value);
-<a name="l00112"></a>00112
-<a name="l00121"></a>00121 <a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* <a class="code" href="ht_8c.html#ad9cac6da8b459d5960079b0d95489960" title="Resizes the underlying table used for storing key/value pairs.">ht_resize</a>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size);
-<a name="l00122"></a>00122
-<a name="l00123"></a>00123 <span class="preprocessor">#endif</span>
+<a name="l00065"></a>00065 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="ht_8c.html#a278174a0154a10b8b10b23937ca4c721" title="Takes a string key value and returns it&#39;s hashed value.">ht_hash_string</a>(<span class="keywordtype">void</span>* key);
+<a name="l00066"></a>00066
+<a name="l00080"></a>00080 <a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* <a class="code" href="ht_8c.html#a0a3e03a29413673acd8899d250cd0844" title="Creates a new hash table.">ht_new</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size, <a class="code" href="ht_8h.html#a91a8d03489ef281e6f26d389c44d42cf" title="Hash function for hashing keys in a hash table.">ht_hash_func</a> fn);
+<a name="l00081"></a>00081
+<a name="l00093"></a>00093 <span class="keywordtype">void</span> <a class="code" href="ht_8c.html#a96de71bf3880ed0a879f60b6e5254803" title="Frees all memory used by the provided hash table.">ht_free</a>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table, <span class="keywordtype">int</span> free_key, <span class="keywordtype">int</span> free_value);
+<a name="l00094"></a>00094
+<a name="l00110"></a>00110 <span class="keywordtype">void</span> <a class="code" href="ht_8h.html#acb11ccfcef6f11d5e9ec31f14b875140" title="Inserts a key/value pair into the provided table.">ht_insert</a>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table, <span class="keywordtype">void</span>* key, <span class="keywordtype">void</span>* val);
+<a name="l00111"></a>00111
+<a name="l00124"></a>00124 <span class="keywordtype">void</span>* <a class="code" href="ht_8h.html#a50855610a2e434aeec5180aa596d44a1" title="Retrieves a value from the provided table.">ht_find</a>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table, <span class="keywordtype">void</span>* key);
+<a name="l00125"></a>00125
+<a name="l00139"></a>00139 <span class="keywordtype">void</span> <a class="code" href="ht_8c.html#a81a813f472a9b689032704fca76b3ce8" title="Deletes a key/value pair from the provided hash table.">ht_delete</a>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table, <span class="keywordtype">void</span>* key, <span class="keywordtype">int</span> free_key, <span class="keywordtype">int</span> free_value);
+<a name="l00140"></a>00140
+<a name="l00155"></a>00155 <a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* <a class="code" href="ht_8c.html#ad9cac6da8b459d5960079b0d95489960" title="Resizes the underlying table used for storing key/value pairs.">ht_resize</a>(<a class="code" href="structht__table.html" title="A hash table.">ht_table</a>* table, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size);
+<a name="l00156"></a>00156
+<a name="l00157"></a>00157 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="ht_8h.html">ht.h</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:03 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:03 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="rbt_8c.html">rbt.c</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="rbt_8c.html">rbt.c</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="rbt_8h.html">rbt.h</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="rbt_8h.html">rbt.h</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
</div>
</div>
+<div class="SRResult" id="SR_ht_5ffind">
+ <div class="SREntry">
+ <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../ht_8h.html#a50855610a2e434aeec5180aa596d44a1" target="_parent">ht_find</a>
+ <span class="SRScope">ht.h</span>
+ </div>
+</div>
<div class="SRResult" id="SR_ht_5ffree">
<div class="SREntry">
- <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5ffree')">ht_free</a>
+ <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5ffree')">ht_free</a>
<div class="SRChildren">
- <a id="Item4_c0" onkeydown="return searchResults.NavChild(event,4,0)" onkeypress="return searchResults.NavChild(event,4,0)" onkeyup="return searchResults.NavChild(event,4,0)" class="SRScope" href="../ht_8c.html#a96de71bf3880ed0a879f60b6e5254803" target="_parent">ht_free(ht_table *table, int free_key, int free_value): ht.c</a>
- <a id="Item4_c1" onkeydown="return searchResults.NavChild(event,4,1)" onkeypress="return searchResults.NavChild(event,4,1)" onkeyup="return searchResults.NavChild(event,4,1)" class="SRScope" href="../ht_8h.html#a96de71bf3880ed0a879f60b6e5254803" target="_parent">ht_free(ht_table *table, int free_key, int free_value): ht.c</a>
+ <a id="Item5_c0" onkeydown="return searchResults.NavChild(event,5,0)" onkeypress="return searchResults.NavChild(event,5,0)" onkeyup="return searchResults.NavChild(event,5,0)" class="SRScope" href="../ht_8c.html#a96de71bf3880ed0a879f60b6e5254803" target="_parent">ht_free(ht_table *table, int free_key, int free_value): ht.c</a>
+ <a id="Item5_c1" onkeydown="return searchResults.NavChild(event,5,1)" onkeypress="return searchResults.NavChild(event,5,1)" onkeyup="return searchResults.NavChild(event,5,1)" class="SRScope" href="../ht_8h.html#a96de71bf3880ed0a879f60b6e5254803" target="_parent">ht_free(ht_table *table, int free_key, int free_value): ht.c</a>
</div>
</div>
</div>
<div class="SRResult" id="SR_ht_5fget">
<div class="SREntry">
- <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fget')">ht_get</a>
- <div class="SRChildren">
- <a id="Item5_c0" onkeydown="return searchResults.NavChild(event,5,0)" onkeypress="return searchResults.NavChild(event,5,0)" onkeyup="return searchResults.NavChild(event,5,0)" class="SRScope" href="../ht_8c.html#a5bc0ba0d31b944797e17a96372bce33e" target="_parent">ht_get(ht_table *table, void *key): ht.c</a>
- <a id="Item5_c1" onkeydown="return searchResults.NavChild(event,5,1)" onkeypress="return searchResults.NavChild(event,5,1)" onkeyup="return searchResults.NavChild(event,5,1)" class="SRScope" href="../ht_8h.html#a5bc0ba0d31b944797e17a96372bce33e" target="_parent">ht_get(ht_table *table, void *key): ht.c</a>
- </div>
+ <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../ht_8c.html#a5bc0ba0d31b944797e17a96372bce33e" target="_parent">ht_get</a>
+ <span class="SRScope">ht.c</span>
</div>
</div>
<div class="SRResult" id="SR_ht_5fhash_5ffunc">
<div class="SREntry">
- <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../ht_8h.html#a91a8d03489ef281e6f26d389c44d42cf" target="_parent">ht_hash_func</a>
+ <a id="Item7" onkeydown="return searchResults.Nav(event,7)" onkeypress="return searchResults.Nav(event,7)" onkeyup="return searchResults.Nav(event,7)" class="SRSymbol" href="../ht_8h.html#a91a8d03489ef281e6f26d389c44d42cf" target="_parent">ht_hash_func</a>
<span class="SRScope">ht.h</span>
</div>
</div>
<div class="SRResult" id="SR_ht_5fhash_5fstring">
<div class="SREntry">
- <a id="Item7" onkeydown="return searchResults.Nav(event,7)" onkeypress="return searchResults.Nav(event,7)" onkeyup="return searchResults.Nav(event,7)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fhash_5fstring')">ht_hash_string</a>
+ <a id="Item8" onkeydown="return searchResults.Nav(event,8)" onkeypress="return searchResults.Nav(event,8)" onkeyup="return searchResults.Nav(event,8)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fhash_5fstring')">ht_hash_string</a>
<div class="SRChildren">
- <a id="Item7_c0" onkeydown="return searchResults.NavChild(event,7,0)" onkeypress="return searchResults.NavChild(event,7,0)" onkeyup="return searchResults.NavChild(event,7,0)" class="SRScope" href="../ht_8c.html#a278174a0154a10b8b10b23937ca4c721" target="_parent">ht_hash_string(void *key): ht.c</a>
- <a id="Item7_c1" onkeydown="return searchResults.NavChild(event,7,1)" onkeypress="return searchResults.NavChild(event,7,1)" onkeyup="return searchResults.NavChild(event,7,1)" class="SRScope" href="../ht_8h.html#a278174a0154a10b8b10b23937ca4c721" target="_parent">ht_hash_string(void *key): ht.c</a>
+ <a id="Item8_c0" onkeydown="return searchResults.NavChild(event,8,0)" onkeypress="return searchResults.NavChild(event,8,0)" onkeyup="return searchResults.NavChild(event,8,0)" class="SRScope" href="../ht_8c.html#a278174a0154a10b8b10b23937ca4c721" target="_parent">ht_hash_string(void *key): ht.c</a>
+ <a id="Item8_c1" onkeydown="return searchResults.NavChild(event,8,1)" onkeypress="return searchResults.NavChild(event,8,1)" onkeyup="return searchResults.NavChild(event,8,1)" class="SRScope" href="../ht_8h.html#a278174a0154a10b8b10b23937ca4c721" target="_parent">ht_hash_string(void *key): ht.c</a>
</div>
</div>
</div>
+<div class="SRResult" id="SR_ht_5finsert">
+ <div class="SREntry">
+ <a id="Item9" onkeydown="return searchResults.Nav(event,9)" onkeypress="return searchResults.Nav(event,9)" onkeyup="return searchResults.Nav(event,9)" class="SRSymbol" href="../ht_8h.html#acb11ccfcef6f11d5e9ec31f14b875140" target="_parent">ht_insert</a>
+ <span class="SRScope">ht.h</span>
+ </div>
+</div>
<div class="SRResult" id="SR_ht_5fnew">
<div class="SREntry">
- <a id="Item8" onkeydown="return searchResults.Nav(event,8)" onkeypress="return searchResults.Nav(event,8)" onkeyup="return searchResults.Nav(event,8)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fnew')">ht_new</a>
+ <a id="Item10" onkeydown="return searchResults.Nav(event,10)" onkeypress="return searchResults.Nav(event,10)" onkeyup="return searchResults.Nav(event,10)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fnew')">ht_new</a>
<div class="SRChildren">
- <a id="Item8_c0" onkeydown="return searchResults.NavChild(event,8,0)" onkeypress="return searchResults.NavChild(event,8,0)" onkeyup="return searchResults.NavChild(event,8,0)" class="SRScope" href="../ht_8c.html#a0a3e03a29413673acd8899d250cd0844" target="_parent">ht_new(unsigned int size, ht_hash_func fn): ht.c</a>
- <a id="Item8_c1" onkeydown="return searchResults.NavChild(event,8,1)" onkeypress="return searchResults.NavChild(event,8,1)" onkeyup="return searchResults.NavChild(event,8,1)" class="SRScope" href="../ht_8h.html#a0a3e03a29413673acd8899d250cd0844" target="_parent">ht_new(unsigned int size, ht_hash_func fn): ht.c</a>
+ <a id="Item10_c0" onkeydown="return searchResults.NavChild(event,10,0)" onkeypress="return searchResults.NavChild(event,10,0)" onkeyup="return searchResults.NavChild(event,10,0)" class="SRScope" href="../ht_8c.html#a0a3e03a29413673acd8899d250cd0844" target="_parent">ht_new(unsigned int size, ht_hash_func fn): ht.c</a>
+ <a id="Item10_c1" onkeydown="return searchResults.NavChild(event,10,1)" onkeypress="return searchResults.NavChild(event,10,1)" onkeyup="return searchResults.NavChild(event,10,1)" class="SRScope" href="../ht_8h.html#a0a3e03a29413673acd8899d250cd0844" target="_parent">ht_new(unsigned int size, ht_hash_func fn): ht.c</a>
</div>
</div>
</div>
<div class="SRResult" id="SR_ht_5fnode">
<div class="SREntry">
- <a id="Item9" onkeydown="return searchResults.Nav(event,9)" onkeypress="return searchResults.Nav(event,9)" onkeyup="return searchResults.Nav(event,9)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fnode')">ht_node</a>
+ <a id="Item11" onkeydown="return searchResults.Nav(event,11)" onkeypress="return searchResults.Nav(event,11)" onkeyup="return searchResults.Nav(event,11)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fnode')">ht_node</a>
<div class="SRChildren">
- <a id="Item9_c0" onkeydown="return searchResults.NavChild(event,9,0)" onkeypress="return searchResults.NavChild(event,9,0)" onkeyup="return searchResults.NavChild(event,9,0)" class="SRScope" href="../structht__node.html" target="_parent">ht_node</a>
- <a id="Item9_c1" onkeydown="return searchResults.NavChild(event,9,1)" onkeypress="return searchResults.NavChild(event,9,1)" onkeyup="return searchResults.NavChild(event,9,1)" class="SRScope" href="../ht_8h.html#a3b70269a378f408bce2ae501e7ed1205" target="_parent">ht_node(): ht.h</a>
+ <a id="Item11_c0" onkeydown="return searchResults.NavChild(event,11,0)" onkeypress="return searchResults.NavChild(event,11,0)" onkeyup="return searchResults.NavChild(event,11,0)" class="SRScope" href="../structht__node.html" target="_parent">ht_node</a>
+ <a id="Item11_c1" onkeydown="return searchResults.NavChild(event,11,1)" onkeypress="return searchResults.NavChild(event,11,1)" onkeyup="return searchResults.NavChild(event,11,1)" class="SRScope" href="../ht_8h.html#a3b70269a378f408bce2ae501e7ed1205" target="_parent">ht_node(): ht.h</a>
</div>
</div>
</div>
<div class="SRResult" id="SR_ht_5fput">
<div class="SREntry">
- <a id="Item10" onkeydown="return searchResults.Nav(event,10)" onkeypress="return searchResults.Nav(event,10)" onkeyup="return searchResults.Nav(event,10)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fput')">ht_put</a>
- <div class="SRChildren">
- <a id="Item10_c0" onkeydown="return searchResults.NavChild(event,10,0)" onkeypress="return searchResults.NavChild(event,10,0)" onkeyup="return searchResults.NavChild(event,10,0)" class="SRScope" href="../ht_8c.html#a8c17c7288d2f510dd5c091cccc6dd056" target="_parent">ht_put(ht_table *table, void *key, void *val): ht.c</a>
- <a id="Item10_c1" onkeydown="return searchResults.NavChild(event,10,1)" onkeypress="return searchResults.NavChild(event,10,1)" onkeyup="return searchResults.NavChild(event,10,1)" class="SRScope" href="../ht_8h.html#a8c17c7288d2f510dd5c091cccc6dd056" target="_parent">ht_put(ht_table *table, void *key, void *val): ht.c</a>
- </div>
+ <a id="Item12" onkeydown="return searchResults.Nav(event,12)" onkeypress="return searchResults.Nav(event,12)" onkeyup="return searchResults.Nav(event,12)" class="SRSymbol" href="../ht_8c.html#a8c17c7288d2f510dd5c091cccc6dd056" target="_parent">ht_put</a>
+ <span class="SRScope">ht.c</span>
</div>
</div>
<div class="SRResult" id="SR_ht_5fresize">
<div class="SREntry">
- <a id="Item11" onkeydown="return searchResults.Nav(event,11)" onkeypress="return searchResults.Nav(event,11)" onkeyup="return searchResults.Nav(event,11)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fresize')">ht_resize</a>
+ <a id="Item13" onkeydown="return searchResults.Nav(event,13)" onkeypress="return searchResults.Nav(event,13)" onkeyup="return searchResults.Nav(event,13)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fresize')">ht_resize</a>
<div class="SRChildren">
- <a id="Item11_c0" onkeydown="return searchResults.NavChild(event,11,0)" onkeypress="return searchResults.NavChild(event,11,0)" onkeyup="return searchResults.NavChild(event,11,0)" class="SRScope" href="../ht_8c.html#ad9cac6da8b459d5960079b0d95489960" target="_parent">ht_resize(ht_table *table, unsigned int size): ht.c</a>
- <a id="Item11_c1" onkeydown="return searchResults.NavChild(event,11,1)" onkeypress="return searchResults.NavChild(event,11,1)" onkeyup="return searchResults.NavChild(event,11,1)" class="SRScope" href="../ht_8h.html#ad9cac6da8b459d5960079b0d95489960" target="_parent">ht_resize(ht_table *table, unsigned int size): ht.c</a>
+ <a id="Item13_c0" onkeydown="return searchResults.NavChild(event,13,0)" onkeypress="return searchResults.NavChild(event,13,0)" onkeyup="return searchResults.NavChild(event,13,0)" class="SRScope" href="../ht_8c.html#ad9cac6da8b459d5960079b0d95489960" target="_parent">ht_resize(ht_table *table, unsigned int size): ht.c</a>
+ <a id="Item13_c1" onkeydown="return searchResults.NavChild(event,13,1)" onkeypress="return searchResults.NavChild(event,13,1)" onkeyup="return searchResults.NavChild(event,13,1)" class="SRScope" href="../ht_8h.html#ad9cac6da8b459d5960079b0d95489960" target="_parent">ht_resize(ht_table *table, unsigned int size): ht.c</a>
</div>
</div>
</div>
<div class="SRResult" id="SR_ht_5ftable">
<div class="SREntry">
- <a id="Item12" onkeydown="return searchResults.Nav(event,12)" onkeypress="return searchResults.Nav(event,12)" onkeyup="return searchResults.Nav(event,12)" class="SRSymbol" href="../structht__table.html" target="_parent">ht_table</a>
+ <a id="Item14" onkeydown="return searchResults.Nav(event,14)" onkeypress="return searchResults.Nav(event,14)" onkeyup="return searchResults.Nav(event,14)" class="SRSymbol" href="../structht__table.html" target="_parent">ht_table</a>
</div>
</div>
<div class="SRStatus" id="Searching">Searching...</div>
<a id="Item12" onkeydown="return searchResults.Nav(event,12)" onkeypress="return searchResults.Nav(event,12)" onkeyup="return searchResults.Nav(event,12)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_sll_5fpop_5fback')">sll_pop_back</a>
<div class="SRChildren">
<a id="Item12_c0" onkeydown="return searchResults.NavChild(event,12,0)" onkeypress="return searchResults.NavChild(event,12,0)" onkeyup="return searchResults.NavChild(event,12,0)" class="SRScope" href="../sll_8c.html#af72e93329186ac936d2bf6f544aa1f6b" target="_parent">sll_pop_back(sll_node *list): sll.c</a>
- <a id="Item12_c1" onkeydown="return searchResults.NavChild(event,12,1)" onkeypress="return searchResults.NavChild(event,12,1)" onkeyup="return searchResults.NavChild(event,12,1)" class="SRScope" href="../sll_8h.html#af72e93329186ac936d2bf6f544aa1f6b" target="_parent">sll_pop_back(sll_node *list): sll.c</a>
+ <a id="Item12_c1" onkeydown="return searchResults.NavChild(event,12,1)" onkeypress="return searchResults.NavChild(event,12,1)" onkeyup="return searchResults.NavChild(event,12,1)" class="SRScope" href="../sll_8h.html#a58add98a437335c8f927344215a40d11" target="_parent">sll_pop_back(sll_node *list, int free_contents): sll.h</a>
</div>
</div>
</div>
<a id="Item13" onkeydown="return searchResults.Nav(event,13)" onkeypress="return searchResults.Nav(event,13)" onkeyup="return searchResults.Nav(event,13)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_sll_5fpop_5ffront')">sll_pop_front</a>
<div class="SRChildren">
<a id="Item13_c0" onkeydown="return searchResults.NavChild(event,13,0)" onkeypress="return searchResults.NavChild(event,13,0)" onkeyup="return searchResults.NavChild(event,13,0)" class="SRScope" href="../sll_8c.html#a1588e5a1f90852ee48403d5313d64269" target="_parent">sll_pop_front(sll_node *list): sll.c</a>
- <a id="Item13_c1" onkeydown="return searchResults.NavChild(event,13,1)" onkeypress="return searchResults.NavChild(event,13,1)" onkeyup="return searchResults.NavChild(event,13,1)" class="SRScope" href="../sll_8h.html#a1588e5a1f90852ee48403d5313d64269" target="_parent">sll_pop_front(sll_node *list): sll.c</a>
+ <a id="Item13_c1" onkeydown="return searchResults.NavChild(event,13,1)" onkeypress="return searchResults.NavChild(event,13,1)" onkeyup="return searchResults.NavChild(event,13,1)" class="SRScope" href="../sll_8h.html#a6702f6f18b540bd21165295eb3ca5c25" target="_parent">sll_pop_front(sll_node *list, int free_contents): sll.h</a>
</div>
</div>
</div>
</div>
</div>
</div>
+<div class="SRResult" id="SR_ht_5ffind">
+ <div class="SREntry">
+ <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../ht_8h.html#a50855610a2e434aeec5180aa596d44a1" target="_parent">ht_find</a>
+ <span class="SRScope">ht.h</span>
+ </div>
+</div>
<div class="SRResult" id="SR_ht_5ffree">
<div class="SREntry">
- <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5ffree')">ht_free</a>
+ <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5ffree')">ht_free</a>
<div class="SRChildren">
- <a id="Item1_c0" onkeydown="return searchResults.NavChild(event,1,0)" onkeypress="return searchResults.NavChild(event,1,0)" onkeyup="return searchResults.NavChild(event,1,0)" class="SRScope" href="../ht_8c.html#a96de71bf3880ed0a879f60b6e5254803" target="_parent">ht_free(ht_table *table, int free_key, int free_value): ht.c</a>
- <a id="Item1_c1" onkeydown="return searchResults.NavChild(event,1,1)" onkeypress="return searchResults.NavChild(event,1,1)" onkeyup="return searchResults.NavChild(event,1,1)" class="SRScope" href="../ht_8h.html#a96de71bf3880ed0a879f60b6e5254803" target="_parent">ht_free(ht_table *table, int free_key, int free_value): ht.c</a>
+ <a id="Item2_c0" onkeydown="return searchResults.NavChild(event,2,0)" onkeypress="return searchResults.NavChild(event,2,0)" onkeyup="return searchResults.NavChild(event,2,0)" class="SRScope" href="../ht_8c.html#a96de71bf3880ed0a879f60b6e5254803" target="_parent">ht_free(ht_table *table, int free_key, int free_value): ht.c</a>
+ <a id="Item2_c1" onkeydown="return searchResults.NavChild(event,2,1)" onkeypress="return searchResults.NavChild(event,2,1)" onkeyup="return searchResults.NavChild(event,2,1)" class="SRScope" href="../ht_8h.html#a96de71bf3880ed0a879f60b6e5254803" target="_parent">ht_free(ht_table *table, int free_key, int free_value): ht.c</a>
</div>
</div>
</div>
<div class="SRResult" id="SR_ht_5fget">
<div class="SREntry">
- <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fget')">ht_get</a>
- <div class="SRChildren">
- <a id="Item2_c0" onkeydown="return searchResults.NavChild(event,2,0)" onkeypress="return searchResults.NavChild(event,2,0)" onkeyup="return searchResults.NavChild(event,2,0)" class="SRScope" href="../ht_8c.html#a5bc0ba0d31b944797e17a96372bce33e" target="_parent">ht_get(ht_table *table, void *key): ht.c</a>
- <a id="Item2_c1" onkeydown="return searchResults.NavChild(event,2,1)" onkeypress="return searchResults.NavChild(event,2,1)" onkeyup="return searchResults.NavChild(event,2,1)" class="SRScope" href="../ht_8h.html#a5bc0ba0d31b944797e17a96372bce33e" target="_parent">ht_get(ht_table *table, void *key): ht.c</a>
- </div>
+ <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../ht_8c.html#a5bc0ba0d31b944797e17a96372bce33e" target="_parent">ht_get</a>
+ <span class="SRScope">ht.c</span>
</div>
</div>
<div class="SRResult" id="SR_ht_5fhash_5fstring">
<div class="SREntry">
- <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fhash_5fstring')">ht_hash_string</a>
+ <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fhash_5fstring')">ht_hash_string</a>
<div class="SRChildren">
- <a id="Item3_c0" onkeydown="return searchResults.NavChild(event,3,0)" onkeypress="return searchResults.NavChild(event,3,0)" onkeyup="return searchResults.NavChild(event,3,0)" class="SRScope" href="../ht_8c.html#a278174a0154a10b8b10b23937ca4c721" target="_parent">ht_hash_string(void *key): ht.c</a>
- <a id="Item3_c1" onkeydown="return searchResults.NavChild(event,3,1)" onkeypress="return searchResults.NavChild(event,3,1)" onkeyup="return searchResults.NavChild(event,3,1)" class="SRScope" href="../ht_8h.html#a278174a0154a10b8b10b23937ca4c721" target="_parent">ht_hash_string(void *key): ht.c</a>
+ <a id="Item4_c0" onkeydown="return searchResults.NavChild(event,4,0)" onkeypress="return searchResults.NavChild(event,4,0)" onkeyup="return searchResults.NavChild(event,4,0)" class="SRScope" href="../ht_8c.html#a278174a0154a10b8b10b23937ca4c721" target="_parent">ht_hash_string(void *key): ht.c</a>
+ <a id="Item4_c1" onkeydown="return searchResults.NavChild(event,4,1)" onkeypress="return searchResults.NavChild(event,4,1)" onkeyup="return searchResults.NavChild(event,4,1)" class="SRScope" href="../ht_8h.html#a278174a0154a10b8b10b23937ca4c721" target="_parent">ht_hash_string(void *key): ht.c</a>
</div>
</div>
</div>
+<div class="SRResult" id="SR_ht_5finsert">
+ <div class="SREntry">
+ <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="../ht_8h.html#acb11ccfcef6f11d5e9ec31f14b875140" target="_parent">ht_insert</a>
+ <span class="SRScope">ht.h</span>
+ </div>
+</div>
<div class="SRResult" id="SR_ht_5fnew">
<div class="SREntry">
- <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fnew')">ht_new</a>
+ <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fnew')">ht_new</a>
<div class="SRChildren">
- <a id="Item4_c0" onkeydown="return searchResults.NavChild(event,4,0)" onkeypress="return searchResults.NavChild(event,4,0)" onkeyup="return searchResults.NavChild(event,4,0)" class="SRScope" href="../ht_8c.html#a0a3e03a29413673acd8899d250cd0844" target="_parent">ht_new(unsigned int size, ht_hash_func fn): ht.c</a>
- <a id="Item4_c1" onkeydown="return searchResults.NavChild(event,4,1)" onkeypress="return searchResults.NavChild(event,4,1)" onkeyup="return searchResults.NavChild(event,4,1)" class="SRScope" href="../ht_8h.html#a0a3e03a29413673acd8899d250cd0844" target="_parent">ht_new(unsigned int size, ht_hash_func fn): ht.c</a>
+ <a id="Item6_c0" onkeydown="return searchResults.NavChild(event,6,0)" onkeypress="return searchResults.NavChild(event,6,0)" onkeyup="return searchResults.NavChild(event,6,0)" class="SRScope" href="../ht_8c.html#a0a3e03a29413673acd8899d250cd0844" target="_parent">ht_new(unsigned int size, ht_hash_func fn): ht.c</a>
+ <a id="Item6_c1" onkeydown="return searchResults.NavChild(event,6,1)" onkeypress="return searchResults.NavChild(event,6,1)" onkeyup="return searchResults.NavChild(event,6,1)" class="SRScope" href="../ht_8h.html#a0a3e03a29413673acd8899d250cd0844" target="_parent">ht_new(unsigned int size, ht_hash_func fn): ht.c</a>
</div>
</div>
</div>
<div class="SRResult" id="SR_ht_5fput">
<div class="SREntry">
- <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fput')">ht_put</a>
- <div class="SRChildren">
- <a id="Item5_c0" onkeydown="return searchResults.NavChild(event,5,0)" onkeypress="return searchResults.NavChild(event,5,0)" onkeyup="return searchResults.NavChild(event,5,0)" class="SRScope" href="../ht_8c.html#a8c17c7288d2f510dd5c091cccc6dd056" target="_parent">ht_put(ht_table *table, void *key, void *val): ht.c</a>
- <a id="Item5_c1" onkeydown="return searchResults.NavChild(event,5,1)" onkeypress="return searchResults.NavChild(event,5,1)" onkeyup="return searchResults.NavChild(event,5,1)" class="SRScope" href="../ht_8h.html#a8c17c7288d2f510dd5c091cccc6dd056" target="_parent">ht_put(ht_table *table, void *key, void *val): ht.c</a>
- </div>
+ <a id="Item7" onkeydown="return searchResults.Nav(event,7)" onkeypress="return searchResults.Nav(event,7)" onkeyup="return searchResults.Nav(event,7)" class="SRSymbol" href="../ht_8c.html#a8c17c7288d2f510dd5c091cccc6dd056" target="_parent">ht_put</a>
+ <span class="SRScope">ht.c</span>
</div>
</div>
<div class="SRResult" id="SR_ht_5fresize">
<div class="SREntry">
- <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fresize')">ht_resize</a>
+ <a id="Item8" onkeydown="return searchResults.Nav(event,8)" onkeypress="return searchResults.Nav(event,8)" onkeyup="return searchResults.Nav(event,8)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ht_5fresize')">ht_resize</a>
<div class="SRChildren">
- <a id="Item6_c0" onkeydown="return searchResults.NavChild(event,6,0)" onkeypress="return searchResults.NavChild(event,6,0)" onkeyup="return searchResults.NavChild(event,6,0)" class="SRScope" href="../ht_8c.html#ad9cac6da8b459d5960079b0d95489960" target="_parent">ht_resize(ht_table *table, unsigned int size): ht.c</a>
- <a id="Item6_c1" onkeydown="return searchResults.NavChild(event,6,1)" onkeypress="return searchResults.NavChild(event,6,1)" onkeyup="return searchResults.NavChild(event,6,1)" class="SRScope" href="../ht_8h.html#ad9cac6da8b459d5960079b0d95489960" target="_parent">ht_resize(ht_table *table, unsigned int size): ht.c</a>
+ <a id="Item8_c0" onkeydown="return searchResults.NavChild(event,8,0)" onkeypress="return searchResults.NavChild(event,8,0)" onkeyup="return searchResults.NavChild(event,8,0)" class="SRScope" href="../ht_8c.html#ad9cac6da8b459d5960079b0d95489960" target="_parent">ht_resize(ht_table *table, unsigned int size): ht.c</a>
+ <a id="Item8_c1" onkeydown="return searchResults.NavChild(event,8,1)" onkeypress="return searchResults.NavChild(event,8,1)" onkeyup="return searchResults.NavChild(event,8,1)" class="SRScope" href="../ht_8h.html#ad9cac6da8b459d5960079b0d95489960" target="_parent">ht_resize(ht_table *table, unsigned int size): ht.c</a>
</div>
</div>
</div>
<a id="Item8" onkeydown="return searchResults.Nav(event,8)" onkeypress="return searchResults.Nav(event,8)" onkeyup="return searchResults.Nav(event,8)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_sll_5fpop_5fback')">sll_pop_back</a>
<div class="SRChildren">
<a id="Item8_c0" onkeydown="return searchResults.NavChild(event,8,0)" onkeypress="return searchResults.NavChild(event,8,0)" onkeyup="return searchResults.NavChild(event,8,0)" class="SRScope" href="../sll_8c.html#af72e93329186ac936d2bf6f544aa1f6b" target="_parent">sll_pop_back(sll_node *list): sll.c</a>
- <a id="Item8_c1" onkeydown="return searchResults.NavChild(event,8,1)" onkeypress="return searchResults.NavChild(event,8,1)" onkeyup="return searchResults.NavChild(event,8,1)" class="SRScope" href="../sll_8h.html#af72e93329186ac936d2bf6f544aa1f6b" target="_parent">sll_pop_back(sll_node *list): sll.c</a>
+ <a id="Item8_c1" onkeydown="return searchResults.NavChild(event,8,1)" onkeypress="return searchResults.NavChild(event,8,1)" onkeyup="return searchResults.NavChild(event,8,1)" class="SRScope" href="../sll_8h.html#a58add98a437335c8f927344215a40d11" target="_parent">sll_pop_back(sll_node *list, int free_contents): sll.h</a>
</div>
</div>
</div>
<a id="Item9" onkeydown="return searchResults.Nav(event,9)" onkeypress="return searchResults.Nav(event,9)" onkeyup="return searchResults.Nav(event,9)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_sll_5fpop_5ffront')">sll_pop_front</a>
<div class="SRChildren">
<a id="Item9_c0" onkeydown="return searchResults.NavChild(event,9,0)" onkeypress="return searchResults.NavChild(event,9,0)" onkeyup="return searchResults.NavChild(event,9,0)" class="SRScope" href="../sll_8c.html#a1588e5a1f90852ee48403d5313d64269" target="_parent">sll_pop_front(sll_node *list): sll.c</a>
- <a id="Item9_c1" onkeydown="return searchResults.NavChild(event,9,1)" onkeypress="return searchResults.NavChild(event,9,1)" onkeyup="return searchResults.NavChild(event,9,1)" class="SRScope" href="../sll_8h.html#a1588e5a1f90852ee48403d5313d64269" target="_parent">sll_pop_front(sll_node *list): sll.c</a>
+ <a id="Item9_c1" onkeydown="return searchResults.NavChild(event,9,1)" onkeypress="return searchResults.NavChild(event,9,1)" onkeyup="return searchResults.NavChild(event,9,1)" class="SRScope" href="../sll_8h.html#a6702f6f18b540bd21165295eb3ca5c25" target="_parent">sll_pop_front(sll_node *list, int free_contents): sll.h</a>
</div>
</div>
</div>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsll__node.html">sll_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8c.html#acfe3ebc296fe75f1d0ee21195dd7b9bf">sll_push_front</a> (<a class="el" href="structsll__node.html">sll_node</a> *list, void *contents)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a new node to the front of an existing linked list. <a href="#acfe3ebc296fe75f1d0ee21195dd7b9bf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsll__node.html">sll_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8c.html#af72e93329186ac936d2bf6f544aa1f6b">sll_pop_back</a> (<a class="el" href="structsll__node.html">sll_node</a> *list)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes and returns a pointer to the last element of the list. <a href="#af72e93329186ac936d2bf6f544aa1f6b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsll__node.html">sll_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8c.html#a1588e5a1f90852ee48403d5313d64269">sll_pop_front</a> (<a class="el" href="structsll__node.html">sll_node</a> *list)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes and returns a pointer to the first element of the list. <a href="#a1588e5a1f90852ee48403d5313d64269"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsll__node.html">sll_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8c.html#a66769edc21579f71972ac90de6da4a9f">sll_insert</a> (<a class="el" href="structsll__node.html">sll_node</a> *list, int index, void *contents)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Inserts a new node in a linked list at the specified index. <a href="#a66769edc21579f71972ac90de6da4a9f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsll__node.html">sll_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8c.html#afd494f171c24981f0d7a007841f21cfe">sll_delete</a> (<a class="el" href="structsll__node.html">sll_node</a> *list, int index, int free_contents)</td></tr>
<div class="memdoc">
<p>Finds and returns the last node in the supplied linked list. </p>
+<p>This function returns a pointer to the last node in the given linked list.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">list</td><td>The linked list to search.</td></tr>
<div class="memdoc">
<p>Deletes a node from the supplied list. </p>
-<p>Deletes the node found at the supplied index from the supplied list and frees the memory used by the node and its contents.</p>
+<p>This function traverses the list to the desired index and frees the memory allocated for that node. If the deleted node has a child then the child is reattached to the deleted node's parent. If free_contents is passed a non-zero value then the node's contents pointer is also freed.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">list</td><td></td></tr>
- <tr><td class="paramname">index</td><td></td></tr>
+ <tr><td class="paramname">list</td><td>The list to operate on. </td></tr>
+ <tr><td class="paramname">index</td><td>The index of the node to delete. </td></tr>
<tr><td class="paramname">free_contents</td><td>Whether or not to also free the contents of the node.</td></tr>
</table>
</dd>
<div class="memdoc">
<p>Frees all memory used by a linked list. </p>
-<p>Loops through the supplied list and frees all nodes. Also frees contents if free_contents is passed TRUE. This is to avoid trying to free memory allocated on the stack.</p>
+<p>This function loops through the supplied list and frees all nodes. Also frees contents if free_contents is passed a non-zero value.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">list</td><td>The list to be freed. </td></tr>
<div class="memdoc">
<p>Finds and returns the first node in the supplied linked list. </p>
+<p>This function returns a pointer to the first node in the given linked list.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">list</td><td>The linked list to search.</td></tr>
<div class="memdoc">
<p>Return the node at the specified index in a linked list. </p>
-<p>Loops through the linked list and returns the node in the list at the specified index. Returns NULL if the index is out of range.</p>
+<p>This function loops through the linked list and returns the node in the list at the specified index. Returns NULL if the index is out of range.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">list</td><td>The list to search for the supplied index. </td></tr>
<div class="memdoc">
<p>Inserts a new node in a linked list at the specified index. </p>
+<p>This function traverses the list to the desired index and inserts a new node with the given contents at that position. The node previously at the desired index becomes the child of the new node.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">list</td><td></td></tr>
- <tr><td class="paramname">index</td><td></td></tr>
- <tr><td class="paramname">contents</td><td></td></tr>
+ <tr><td class="paramname">list</td><td>The list to operate on. </td></tr>
+ <tr><td class="paramname">index</td><td>The index where the new node will be inserted. </td></tr>
+ <tr><td class="paramname">contents</td><td>The contents of the new node.</td></tr>
</table>
</dd>
</dl>
<div class="memdoc">
<p>Returns the number of elements in the list. </p>
-<p>Loops through the supplied list and returns a count of the number of elements contained in the list.</p>
+<p>This function loops through the supplied list and returns a count of the number of elements contained in the list.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">list</td><td>The list to be counted.</td></tr>
<div class="memdoc">
<p>Creates a new linked list node with the supplied value. </p>
-<p>This function allocates a new node on the heap and populates the node contents with the supplied contents pointer.</p>
+<p>This function allocates a new node and populates the node contents with the supplied contents pointer.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">contents</td><td>The contents of the newly created node.</td></tr>
</div>
<div class="memdoc">
-<p>Removes and returns a pointer to the last element of the list. </p>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table class="params">
- <tr><td class="paramname">list</td><td></td></tr>
- <tr><td class="paramname">contents</td><td></td></tr>
- </table>
- </dd>
-</dl>
-<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to the newly added node. </dd></dl>
-
<p>Definition at line <a class="el" href="sll_8c_source.html#l00080">80</a> of file <a class="el" href="sll_8c_source.html">sll.c</a>.</p>
</div>
</div>
<div class="memdoc">
-<p>Removes and returns a pointer to the first element of the list. </p>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table class="params">
- <tr><td class="paramname">list</td><td></td></tr>
- <tr><td class="paramname">contents</td><td></td></tr>
- </table>
- </dd>
-</dl>
-<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to the newly added node. </dd></dl>
-
<p>Definition at line <a class="el" href="sll_8c_source.html#l00084">84</a> of file <a class="el" href="sll_8c_source.html">sll.c</a>.</p>
</div>
<div class="memdoc">
<p>Adds a new node to the end of an existing linked list. </p>
+<p>This function creates a new node and pushes it to the end of the given list. The newly created node becomes the new tail of the list.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">list</td><td></td></tr>
- <tr><td class="paramname">contents</td><td></td></tr>
+ <tr><td class="paramname">list</td><td>The list to operate on. </td></tr>
+ <tr><td class="paramname">contents</td><td>The contents of the new node.</td></tr>
</table>
</dd>
</dl>
<div class="memdoc">
<p>Adds a new node to the front of an existing linked list. </p>
+<p>This function creates a new node and pushes it to the beginning of the given list. The newly created node becomes the new head of the list.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">list</td><td></td></tr>
- <tr><td class="paramname">contents</td><td></td></tr>
+ <tr><td class="paramname">list</td><td>The list to operate on. </td></tr>
+ <tr><td class="paramname">contents</td><td>The contents of the new node.</td></tr>
</table>
</dd>
</dl>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="sll_8c.html">sll.c</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<a name="l00077"></a>00077 {
<a name="l00078"></a>00078 }
<a name="l00079"></a>00079
-<a name="l00080"></a><a class="code" href="sll_8h.html#af72e93329186ac936d2bf6f544aa1f6b">00080</a> <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#af72e93329186ac936d2bf6f544aa1f6b" title="Removes and returns a pointer to the last element of the list.">sll_pop_back</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list )
+<a name="l00080"></a><a class="code" href="sll_8c.html#af72e93329186ac936d2bf6f544aa1f6b">00080</a> <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#af72e93329186ac936d2bf6f544aa1f6b">sll_pop_back</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list )
<a name="l00081"></a>00081 {
<a name="l00082"></a>00082 }
<a name="l00083"></a>00083
-<a name="l00084"></a><a class="code" href="sll_8h.html#a1588e5a1f90852ee48403d5313d64269">00084</a> <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#a1588e5a1f90852ee48403d5313d64269" title="Removes and returns a pointer to the first element of the list.">sll_pop_front</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list )
+<a name="l00084"></a><a class="code" href="sll_8c.html#a1588e5a1f90852ee48403d5313d64269">00084</a> <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#a1588e5a1f90852ee48403d5313d64269">sll_pop_front</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list )
<a name="l00085"></a>00085 {
<a name="l00086"></a>00086 }
<a name="l00087"></a>00087
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="sll_8c.html">sll.c</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:03 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Finds and returns the last node in the supplied linked list. <a href="#a78ef5151212d47bb63f2fd93453283ed"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsll__node.html">sll_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8h.html#a0582f263482ead73d53b018978513540">sll_index</a> (<a class="el" href="structsll__node.html">sll_node</a> *list, int index)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the node at the specified index in a linked list. <a href="#a0582f263482ead73d53b018978513540"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsll__node.html">sll_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8h.html#a19ad0a86a87451a3ab68ad6d18c3e3e0">sll_push_back</a> (<a class="el" href="structsll__node.html">sll_node</a> *list, void *contents)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a new node to the end of an existing linked list. <a href="#a19ad0a86a87451a3ab68ad6d18c3e3e0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsll__node.html">sll_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8h.html#acfe3ebc296fe75f1d0ee21195dd7b9bf">sll_push_front</a> (<a class="el" href="structsll__node.html">sll_node</a> *list, void *contents)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a new node to the front of an existing linked list. <a href="#acfe3ebc296fe75f1d0ee21195dd7b9bf"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsll__node.html">sll_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8h.html#af72e93329186ac936d2bf6f544aa1f6b">sll_pop_back</a> (<a class="el" href="structsll__node.html">sll_node</a> *list)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes and returns a pointer to the last element of the list. <a href="#af72e93329186ac936d2bf6f544aa1f6b"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsll__node.html">sll_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8h.html#a1588e5a1f90852ee48403d5313d64269">sll_pop_front</a> (<a class="el" href="structsll__node.html">sll_node</a> *list)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes and returns a pointer to the first element of the list. <a href="#a1588e5a1f90852ee48403d5313d64269"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsll__node.html">sll_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8h.html#a19ad0a86a87451a3ab68ad6d18c3e3e0">sll_push_back</a> (<a class="el" href="structsll__node.html">sll_node</a> *list, void *contents)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a new node to the end of an existing linked list. <a href="#a19ad0a86a87451a3ab68ad6d18c3e3e0"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8h.html#a6702f6f18b540bd21165295eb3ca5c25">sll_pop_front</a> (<a class="el" href="structsll__node.html">sll_node</a> *list, int free_contents)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes and returns a pointer to the first element of the list. <a href="#a6702f6f18b540bd21165295eb3ca5c25"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8h.html#a58add98a437335c8f927344215a40d11">sll_pop_back</a> (<a class="el" href="structsll__node.html">sll_node</a> *list, int free_contents)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes and returns a pointer to the last element of the list. <a href="#a58add98a437335c8f927344215a40d11"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsll__node.html">sll_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8h.html#a66769edc21579f71972ac90de6da4a9f">sll_insert</a> (<a class="el" href="structsll__node.html">sll_node</a> *list, int index, void *contents)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Inserts a new node in a linked list at the specified index. <a href="#a66769edc21579f71972ac90de6da4a9f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsll__node.html">sll_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="sll_8h.html#afd494f171c24981f0d7a007841f21cfe">sll_delete</a> (<a class="el" href="structsll__node.html">sll_node</a> *list, int index, int free_contents)</td></tr>
<div class="memdoc">
<p>Finds and returns the last node in the supplied linked list. </p>
+<p>This function returns a pointer to the last node in the given linked list.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">list</td><td>The linked list to search.</td></tr>
<div class="memdoc">
<p>Deletes a node from the supplied list. </p>
-<p>Deletes the node found at the supplied index from the supplied list and frees the memory used by the node and its contents.</p>
+<p>This function traverses the list to the desired index and frees the memory allocated for that node. If the deleted node has a child then the child is reattached to the deleted node's parent. If free_contents is passed a non-zero value then the node's contents pointer is also freed.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">list</td><td></td></tr>
- <tr><td class="paramname">index</td><td></td></tr>
+ <tr><td class="paramname">list</td><td>The list to operate on. </td></tr>
+ <tr><td class="paramname">index</td><td>The index of the node to delete. </td></tr>
<tr><td class="paramname">free_contents</td><td>Whether or not to also free the contents of the node.</td></tr>
</table>
</dd>
<div class="memdoc">
<p>Frees all memory used by a linked list. </p>
-<p>Loops through the supplied list and frees all nodes. Also frees contents if free_contents is passed TRUE. This is to avoid trying to free memory allocated on the stack.</p>
+<p>This function loops through the supplied list and frees all nodes. Also frees contents if free_contents is passed a non-zero value.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">list</td><td>The list to be freed. </td></tr>
<div class="memdoc">
<p>Finds and returns the first node in the supplied linked list. </p>
+<p>This function returns a pointer to the first node in the given linked list.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">list</td><td>The linked list to search.</td></tr>
<div class="memdoc">
<p>Return the node at the specified index in a linked list. </p>
-<p>Loops through the linked list and returns the node in the list at the specified index. Returns NULL if the index is out of range.</p>
+<p>This function loops through the linked list and returns the node in the list at the specified index. Returns NULL if the index is out of range.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">list</td><td>The list to search for the supplied index. </td></tr>
<div class="memdoc">
<p>Inserts a new node in a linked list at the specified index. </p>
+<p>This function traverses the list to the desired index and inserts a new node with the given contents at that position. The node previously at the desired index becomes the child of the new node.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">list</td><td></td></tr>
- <tr><td class="paramname">index</td><td></td></tr>
- <tr><td class="paramname">contents</td><td></td></tr>
+ <tr><td class="paramname">list</td><td>The list to operate on. </td></tr>
+ <tr><td class="paramname">index</td><td>The index where the new node will be inserted. </td></tr>
+ <tr><td class="paramname">contents</td><td>The contents of the new node.</td></tr>
</table>
</dd>
</dl>
<div class="memdoc">
<p>Returns the number of elements in the list. </p>
-<p>Loops through the supplied list and returns a count of the number of elements contained in the list.</p>
+<p>This function loops through the supplied list and returns a count of the number of elements contained in the list.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">list</td><td>The list to be counted.</td></tr>
<div class="memdoc">
<p>Creates a new linked list node with the supplied value. </p>
-<p>This function allocates a new node on the heap and populates the node contents with the supplied contents pointer.</p>
+<p>This function allocates a new node and populates the node contents with the supplied contents pointer.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">contents</td><td>The contents of the newly created node.</td></tr>
</div>
</div>
-<a class="anchor" id="af72e93329186ac936d2bf6f544aa1f6b"></a><!-- doxytag: member="sll.h::sll_pop_back" ref="af72e93329186ac936d2bf6f544aa1f6b" args="(sll_node *list)" -->
+<a class="anchor" id="a58add98a437335c8f927344215a40d11"></a><!-- doxytag: member="sll.h::sll_pop_back" ref="a58add98a437335c8f927344215a40d11" args="(sll_node *list, int free_contents)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname"><a class="el" href="structsll__node.html">sll_node</a>* sll_pop_back </td>
+ <td class="memname">void sll_pop_back </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structsll__node.html">sll_node</a> * </td>
- <td class="paramname"><em>list</em></td><td>)</td>
+ <td class="paramname"><em>list</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
<td></td>
+ <td class="paramtype">int </td>
+ <td class="paramname"><em>free_contents</em> </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Removes and returns a pointer to the last element of the list. </p>
+<p>This function removes the last node from the list and frees it's associated memory. If free_contents is passed a non-zero value then it's contents pointer is also freed. The second to last node in the list becomes the new tail of the list.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">list</td><td></td></tr>
- <tr><td class="paramname">contents</td><td></td></tr>
+ <tr><td class="paramname">list</td><td>The list to operate on. </td></tr>
+ <tr><td class="paramname">free_contents</td><td>Determines whether to free the contents pointer.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to the newly added node. </dd></dl>
-<p>Definition at line <a class="el" href="sll_8c_source.html#l00080">80</a> of file <a class="el" href="sll_8c_source.html">sll.c</a>.</p>
-
</div>
</div>
-<a class="anchor" id="a1588e5a1f90852ee48403d5313d64269"></a><!-- doxytag: member="sll.h::sll_pop_front" ref="a1588e5a1f90852ee48403d5313d64269" args="(sll_node *list)" -->
+<a class="anchor" id="a6702f6f18b540bd21165295eb3ca5c25"></a><!-- doxytag: member="sll.h::sll_pop_front" ref="a6702f6f18b540bd21165295eb3ca5c25" args="(sll_node *list, int free_contents)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname"><a class="el" href="structsll__node.html">sll_node</a>* sll_pop_front </td>
+ <td class="memname">void sll_pop_front </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structsll__node.html">sll_node</a> * </td>
- <td class="paramname"><em>list</em></td><td>)</td>
+ <td class="paramname"><em>list</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
<td></td>
+ <td class="paramtype">int </td>
+ <td class="paramname"><em>free_contents</em> </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Removes and returns a pointer to the first element of the list. </p>
+<p>This function removes the first node from the list and frees it's associated memory. If free_contents is passed a non-zero value then it's contents pointer is also freed. The second node in the list becomes the new head of the list.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">list</td><td></td></tr>
- <tr><td class="paramname">contents</td><td></td></tr>
+ <tr><td class="paramname">list</td><td>The lsit to operate on. </td></tr>
+ <tr><td class="paramname">free_contents</td><td>Determines whether to free the contents pointer.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to the newly added node. </dd></dl>
-<p>Definition at line <a class="el" href="sll_8c_source.html#l00084">84</a> of file <a class="el" href="sll_8c_source.html">sll.c</a>.</p>
-
</div>
</div>
<a class="anchor" id="a19ad0a86a87451a3ab68ad6d18c3e3e0"></a><!-- doxytag: member="sll.h::sll_push_back" ref="a19ad0a86a87451a3ab68ad6d18c3e3e0" args="(sll_node *list, void *contents)" -->
<div class="memdoc">
<p>Adds a new node to the end of an existing linked list. </p>
+<p>This function creates a new node and pushes it to the end of the given list. The newly created node becomes the new tail of the list.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">list</td><td></td></tr>
- <tr><td class="paramname">contents</td><td></td></tr>
+ <tr><td class="paramname">list</td><td>The list to operate on. </td></tr>
+ <tr><td class="paramname">contents</td><td>The contents of the new node.</td></tr>
</table>
</dd>
</dl>
<div class="memdoc">
<p>Adds a new node to the front of an existing linked list. </p>
+<p>This function creates a new node and pushes it to the beginning of the given list. The newly created node becomes the new head of the list.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
- <tr><td class="paramname">list</td><td></td></tr>
- <tr><td class="paramname">contents</td><td></td></tr>
+ <tr><td class="paramname">list</td><td>The list to operate on. </td></tr>
+ <tr><td class="paramname">contents</td><td>The contents of the new node.</td></tr>
</table>
</dd>
</dl>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="sll_8h.html">sll.h</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<a name="l00038"></a>00038
<a name="l00049"></a>00049 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#a471151d11dc385e3364c9a38b19ecba7" title="Creates a new linked list node with the supplied value.">sll_new</a>( <span class="keywordtype">void</span>* <a class="code" href="structsll__node.html#aafacbed96ba149b0b8c705426196154c" title="Pointer to the contents the node.">contents</a> );
<a name="l00050"></a>00050
-<a name="l00058"></a>00058 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#abe6fe02fbfcbf1d647ff94295b855e7e" title="Finds and returns the first node in the supplied linked list.">sll_front</a>(<a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list);
-<a name="l00059"></a>00059
-<a name="l00067"></a>00067 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#a78ef5151212d47bb63f2fd93453283ed" title="Finds and returns the last node in the supplied linked list.">sll_back</a>(<a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list);
-<a name="l00068"></a>00068
-<a name="l00080"></a>00080 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#a0582f263482ead73d53b018978513540" title="Return the node at the specified index in a linked list.">sll_index</a>(<a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list, <span class="keywordtype">int</span> index);
-<a name="l00081"></a>00081
-<a name="l00090"></a>00090 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#a19ad0a86a87451a3ab68ad6d18c3e3e0" title="Adds a new node to the end of an existing linked list.">sll_push_back</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list, <span class="keywordtype">void</span>* <a class="code" href="structsll__node.html#aafacbed96ba149b0b8c705426196154c" title="Pointer to the contents the node.">contents</a> );
-<a name="l00091"></a>00091
-<a name="l00100"></a>00100 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#acfe3ebc296fe75f1d0ee21195dd7b9bf" title="Adds a new node to the front of an existing linked list.">sll_push_front</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list, <span class="keywordtype">void</span>* <a class="code" href="structsll__node.html#aafacbed96ba149b0b8c705426196154c" title="Pointer to the contents the node.">contents</a> );
-<a name="l00101"></a>00101
-<a name="l00110"></a>00110 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#af72e93329186ac936d2bf6f544aa1f6b" title="Removes and returns a pointer to the last element of the list.">sll_pop_back</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list );
+<a name="l00060"></a>00060 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#abe6fe02fbfcbf1d647ff94295b855e7e" title="Finds and returns the first node in the supplied linked list.">sll_front</a>(<a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list);
+<a name="l00061"></a>00061
+<a name="l00071"></a>00071 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#a78ef5151212d47bb63f2fd93453283ed" title="Finds and returns the last node in the supplied linked list.">sll_back</a>(<a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list);
+<a name="l00072"></a>00072
+<a name="l00084"></a>00084 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#a0582f263482ead73d53b018978513540" title="Return the node at the specified index in a linked list.">sll_index</a>(<a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list, <span class="keywordtype">int</span> index);
+<a name="l00085"></a>00085
+<a name="l00097"></a>00097 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#acfe3ebc296fe75f1d0ee21195dd7b9bf" title="Adds a new node to the front of an existing linked list.">sll_push_front</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list, <span class="keywordtype">void</span>* <a class="code" href="structsll__node.html#aafacbed96ba149b0b8c705426196154c" title="Pointer to the contents the node.">contents</a> );
+<a name="l00098"></a>00098
+<a name="l00110"></a>00110 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#a19ad0a86a87451a3ab68ad6d18c3e3e0" title="Adds a new node to the end of an existing linked list.">sll_push_back</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list, <span class="keywordtype">void</span>* <a class="code" href="structsll__node.html#aafacbed96ba149b0b8c705426196154c" title="Pointer to the contents the node.">contents</a> );
<a name="l00111"></a>00111
-<a name="l00120"></a>00120 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#a1588e5a1f90852ee48403d5313d64269" title="Removes and returns a pointer to the first element of the list.">sll_pop_front</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list );
-<a name="l00121"></a>00121
-<a name="l00131"></a>00131 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#a66769edc21579f71972ac90de6da4a9f" title="Inserts a new node in a linked list at the specified index.">sll_insert</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list, <span class="keywordtype">int</span> index, <span class="keywordtype">void</span>* <a class="code" href="structsll__node.html#aafacbed96ba149b0b8c705426196154c" title="Pointer to the contents the node.">contents</a>);
-<a name="l00132"></a>00132
-<a name="l00145"></a>00145 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#afd494f171c24981f0d7a007841f21cfe" title="Deletes a node from the supplied list.">sll_delete</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list, <span class="keywordtype">int</span> index, <span class="keywordtype">int</span> free_contents);
-<a name="l00146"></a>00146
-<a name="l00157"></a>00157 <span class="keywordtype">void</span> <a class="code" href="sll_8c.html#a7373cc6bac0876b330da73722e24910b" title="Frees all memory used by a linked list.">sll_free</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list, <span class="keywordtype">int</span> free_contents);
-<a name="l00158"></a>00158
-<a name="l00169"></a>00169 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="sll_8c.html#af5f6589df6d0ef48ed6f57ac5527ddfe" title="Returns the number of elements in the list.">sll_length</a>(<a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list);
-<a name="l00170"></a>00170
-<a name="l00171"></a>00171 <span class="preprocessor">#endif</span>
+<a name="l00125"></a>00125 <span class="keywordtype">void</span> <a class="code" href="sll_8c.html#a1588e5a1f90852ee48403d5313d64269">sll_pop_front</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list, <span class="keywordtype">int</span> free_contents );
+<a name="l00126"></a>00126
+<a name="l00140"></a>00140 <span class="keywordtype">void</span> <a class="code" href="sll_8c.html#af72e93329186ac936d2bf6f544aa1f6b">sll_pop_back</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list, <span class="keywordtype">int</span> free_contents );
+<a name="l00141"></a>00141
+<a name="l00155"></a>00155 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#a66769edc21579f71972ac90de6da4a9f" title="Inserts a new node in a linked list at the specified index.">sll_insert</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list, <span class="keywordtype">int</span> index, <span class="keywordtype">void</span>* <a class="code" href="structsll__node.html#aafacbed96ba149b0b8c705426196154c" title="Pointer to the contents the node.">contents</a>);
+<a name="l00156"></a>00156
+<a name="l00171"></a>00171 <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* <a class="code" href="sll_8c.html#afd494f171c24981f0d7a007841f21cfe" title="Deletes a node from the supplied list.">sll_delete</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list, <span class="keywordtype">int</span> index, <span class="keywordtype">int</span> free_contents);
+<a name="l00172"></a>00172
+<a name="l00182"></a>00182 <span class="keywordtype">void</span> <a class="code" href="sll_8c.html#a7373cc6bac0876b330da73722e24910b" title="Frees all memory used by a linked list.">sll_free</a>( <a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list, <span class="keywordtype">int</span> free_contents);
+<a name="l00183"></a>00183
+<a name="l00194"></a>00194 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="sll_8c.html#af5f6589df6d0ef48ed6f57ac5527ddfe" title="Returns the number of elements in the list.">sll_length</a>(<a class="code" href="structsll__node.html" title="A linked list node.">sll_node</a>* list);
+<a name="l00195"></a>00195
+<a name="l00196"></a>00196 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="sll_8h.html">sll.h</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="structbt__node.html">bt_node</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="structbt__tree.html">bt_tree</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="structht__node.html">ht_node</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="structht__table.html">ht_table</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:04 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:05 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="structsll__node.html">sll_node</a> </li>
- <li class="footer">Generated on Fri Mar 23 2012 11:12:04 for Data Structures by 
+ <li class="footer">Generated on Fri Mar 23 2012 12:45:05 for Data Structures by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
\fancyhead[RO]{\fancyplain{}{\bfseries\thepage}}
\fancyfoot[LE]{\fancyplain{}{}}
\fancyfoot[CE]{\fancyplain{}{}}
-\fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize Generated on Fri Mar 23 2012 11:12:03 for Data Structures by Doxygen }}
-\fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize Generated on Fri Mar 23 2012 11:12:03 for Data Structures by Doxygen }}
+\fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize Generated on Fri Mar 23 2012 12:45:04 for Data Structures by Doxygen }}
+\fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize Generated on Fri Mar 23 2012 12:45:04 for Data Structures by Doxygen }}
\fancyfoot[CO]{\fancyplain{}{}}
\fancyfoot[RO]{\fancyplain{}{}}
%---------- Internal commands used in this style file ----------------
unsigned int \hyperlink{ht_8c_a278174a0154a10b8b10b23937ca4c721}{ht\_\-hash\_\-string} (void $\ast$key)
\begin{DoxyCompactList}\small\item\em Takes a string key value and returns it's hashed value. \item\end{DoxyCompactList}\item
\hyperlink{structht__table}{ht\_\-table} $\ast$ \hyperlink{ht_8c_a0a3e03a29413673acd8899d250cd0844}{ht\_\-new} (unsigned int size, \hyperlink{ht_8h_a91a8d03489ef281e6f26d389c44d42cf}{ht\_\-hash\_\-func} fn)
-\begin{DoxyCompactList}\small\item\em Creates a new hash table of the given size using the provided hash function or the built-\/in string hashing function otherwise. \item\end{DoxyCompactList}\item
+\begin{DoxyCompactList}\small\item\em Creates a new hash table. \item\end{DoxyCompactList}\item
void \hyperlink{ht_8c_a96de71bf3880ed0a879f60b6e5254803}{ht\_\-free} (\hyperlink{structht__table}{ht\_\-table} $\ast$table, int free\_\-key, int free\_\-value)
\begin{DoxyCompactList}\small\item\em Frees all memory used by the provided hash table. \item\end{DoxyCompactList}\item
void \hyperlink{ht_8c_a8c17c7288d2f510dd5c091cccc6dd056}{ht\_\-put} (\hyperlink{structht__table}{ht\_\-table} $\ast$table, void $\ast$key, void $\ast$val)
-\begin{DoxyCompactList}\small\item\em Inserts a key/value pair into the provided table. \item\end{DoxyCompactList}\item
+\item
void $\ast$ \hyperlink{ht_8c_a5bc0ba0d31b944797e17a96372bce33e}{ht\_\-get} (\hyperlink{structht__table}{ht\_\-table} $\ast$table, void $\ast$key)
-\begin{DoxyCompactList}\small\item\em Retrieves a value from the provided table. \item\end{DoxyCompactList}\item
+\item
void \hyperlink{ht_8c_a81a813f472a9b689032704fca76b3ce8}{ht\_\-delete} (\hyperlink{structht__table}{ht\_\-table} $\ast$table, void $\ast$key, int free\_\-key, int free\_\-value)
\begin{DoxyCompactList}\small\item\em Deletes a key/value pair from the provided hash table. \item\end{DoxyCompactList}\item
\hyperlink{structht__table}{ht\_\-table} $\ast$ \hyperlink{ht_8c_ad9cac6da8b459d5960079b0d95489960}{ht\_\-resize} (\hyperlink{structht__table}{ht\_\-table} $\ast$table, unsigned int size)
Deletes a key/value pair from the provided hash table.
+This function looks up an entry in the table by hashing the key with the table's hash function. If an entry is found then the memory allocated for the entry is freed. If free\_\-key or free\_\-value are non-\/zero values then the key or value pointers are freed respectively.
+
\begin{DoxyParams}{Parameters}
{\em table} & The table from which the key/value pait will be deleted. \\
Frees all memory used by the provided hash table.
+This function frees all memory allocated for the given table. If free\_\-key or free\_\-value are non-\/zero values then the key or value pointers are freed respectively.
+
\begin{DoxyParams}{Parameters}
{\em table} & The table to be freed. \\
\label{ht_8c_a5bc0ba0d31b944797e17a96372bce33e}
-Retrieves a value from the provided table.
-
-
-\begin{DoxyParams}{Parameters}
-{\em table} & The table in which to find the associated value. \\
-\hline
-{\em key} & The key to lookup.\\
-\hline
-\end{DoxyParams}
-\begin{DoxyReturn}{Returns}
-A pointer to the value associated with the provided key.
-\end{DoxyReturn}
-
-
Definition at line 108 of file ht.c.
\hypertarget{ht_8c_a278174a0154a10b8b10b23937ca4c721}{
Takes a string key value and returns it's hashed value.
+This function takes a pointer to a string and returns a hash value based on the contents of the string.
+
\begin{DoxyParams}{Parameters}
{\em key} & Pointer to the string to hash.\\
-Here is the caller graph for this function:\nopagebreak
+Here is the caller graph for this function:
+\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\label{ht_8c_a0a3e03a29413673acd8899d250cd0844}
-Creates a new hash table of the given size using the provided hash function or the built-\/in string hashing function otherwise.
+Creates a new hash table.
+
+This fucntion creates a new empty hash table with an internal lookup table of the given size and the desired hash function. The hash function will be used for insertion, deletion, and lookup of elements within the table. If the hash function pointer is null then ht\_\-hash\_\-string is used.
\begin{DoxyParams}{Parameters}
\label{ht_8c_a8c17c7288d2f510dd5c091cccc6dd056}
-Inserts a key/value pair into the provided table.
-
-
-\begin{DoxyParams}{Parameters}
-{\em table} & The table to be freed. \\
-\hline
-{\em key} & The key for the associated value. \\
-\hline
-{\em val} & The value to be associated with the key. \\
-\hline
-\end{DoxyParams}
-
-
Definition at line 73 of file ht.c.
\hypertarget{ht_8c_ad9cac6da8b459d5960079b0d95489960}{
Resizes the underlying table used for storing key/value pairs.
+This function allocates a new internal lookup table of the given size to replace the internal table for the provided hash table. After the new talbe is created, all entries from the old table are rehahsed and inserted into the new lookup table. The new lookup table then replaces the old lookup table and the old lookup table is freed.
+
\begin{DoxyParams}{Parameters}
{\em table} & The table to be resized. \\
-a648bcf8938db9ae20e8ca6124b91987
\ No newline at end of file
+5effe68ea7e27dd3011415a7f9133dc6
\ No newline at end of file
unsigned int \hyperlink{ht_8h_a278174a0154a10b8b10b23937ca4c721}{ht\_\-hash\_\-string} (void $\ast$key)
\begin{DoxyCompactList}\small\item\em Takes a string key value and returns it's hashed value. \item\end{DoxyCompactList}\item
\hyperlink{structht__table}{ht\_\-table} $\ast$ \hyperlink{ht_8h_a0a3e03a29413673acd8899d250cd0844}{ht\_\-new} (unsigned int size, \hyperlink{ht_8h_a91a8d03489ef281e6f26d389c44d42cf}{ht\_\-hash\_\-func} fn)
-\begin{DoxyCompactList}\small\item\em Creates a new hash table of the given size using the provided hash function or the built-\/in string hashing function otherwise. \item\end{DoxyCompactList}\item
+\begin{DoxyCompactList}\small\item\em Creates a new hash table. \item\end{DoxyCompactList}\item
void \hyperlink{ht_8h_a96de71bf3880ed0a879f60b6e5254803}{ht\_\-free} (\hyperlink{structht__table}{ht\_\-table} $\ast$table, int free\_\-key, int free\_\-value)
\begin{DoxyCompactList}\small\item\em Frees all memory used by the provided hash table. \item\end{DoxyCompactList}\item
-void \hyperlink{ht_8h_a8c17c7288d2f510dd5c091cccc6dd056}{ht\_\-put} (\hyperlink{structht__table}{ht\_\-table} $\ast$table, void $\ast$key, void $\ast$val)
+void \hyperlink{ht_8h_acb11ccfcef6f11d5e9ec31f14b875140}{ht\_\-insert} (\hyperlink{structht__table}{ht\_\-table} $\ast$table, void $\ast$key, void $\ast$val)
\begin{DoxyCompactList}\small\item\em Inserts a key/value pair into the provided table. \item\end{DoxyCompactList}\item
-void $\ast$ \hyperlink{ht_8h_a5bc0ba0d31b944797e17a96372bce33e}{ht\_\-get} (\hyperlink{structht__table}{ht\_\-table} $\ast$table, void $\ast$key)
+void $\ast$ \hyperlink{ht_8h_a50855610a2e434aeec5180aa596d44a1}{ht\_\-find} (\hyperlink{structht__table}{ht\_\-table} $\ast$table, void $\ast$key)
\begin{DoxyCompactList}\small\item\em Retrieves a value from the provided table. \item\end{DoxyCompactList}\item
void \hyperlink{ht_8h_a81a813f472a9b689032704fca76b3ce8}{ht\_\-delete} (\hyperlink{structht__table}{ht\_\-table} $\ast$table, void $\ast$key, int free\_\-key, int free\_\-value)
\begin{DoxyCompactList}\small\item\em Deletes a key/value pair from the provided hash table. \item\end{DoxyCompactList}\item
Deletes a key/value pair from the provided hash table.
+This function looks up an entry in the table by hashing the key with the table's hash function. If an entry is found then the memory allocated for the entry is freed. If free\_\-key or free\_\-value are non-\/zero values then the key or value pointers are freed respectively.
+
\begin{DoxyParams}{Parameters}
{\em table} & The table from which the key/value pait will be deleted. \\
Definition at line 125 of file ht.c.
+\hypertarget{ht_8h_a50855610a2e434aeec5180aa596d44a1}{
+\index{ht.h@{ht.h}!ht\_\-find@{ht\_\-find}}
+\index{ht\_\-find@{ht\_\-find}!ht.h@{ht.h}}
+\subsubsection[{ht\_\-find}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ ht\_\-find (
+\begin{DoxyParamCaption}
+\item[{{\bf ht\_\-table} $\ast$}]{table, }
+\item[{void $\ast$}]{key}
+\end{DoxyParamCaption}
+)}}
+\label{ht_8h_a50855610a2e434aeec5180aa596d44a1}
+
+
+Retrieves a value from the provided table.
+
+This function looks up an entry in the table by hashing the key with the table's hash function. It then returns the pointer to the value of the found entry or a null pointer if no entry was found.
+
+
+\begin{DoxyParams}{Parameters}
+{\em table} & The table in which to find the associated value. \\
+\hline
+{\em key} & The key to lookup.\\
+\hline
+\end{DoxyParams}
+\begin{DoxyReturn}{Returns}
+A pointer to the value associated with the provided key.
+\end{DoxyReturn}
\hypertarget{ht_8h_a96de71bf3880ed0a879f60b6e5254803}{
\index{ht.h@{ht.h}!ht\_\-free@{ht\_\-free}}
\index{ht\_\-free@{ht\_\-free}!ht.h@{ht.h}}
Frees all memory used by the provided hash table.
+This function frees all memory allocated for the given table. If free\_\-key or free\_\-value are non-\/zero values then the key or value pointers are freed respectively.
+
\begin{DoxyParams}{Parameters}
{\em table} & The table to be freed. \\
Definition at line 55 of file ht.c.
-\hypertarget{ht_8h_a5bc0ba0d31b944797e17a96372bce33e}{
-\index{ht.h@{ht.h}!ht\_\-get@{ht\_\-get}}
-\index{ht\_\-get@{ht\_\-get}!ht.h@{ht.h}}
-\subsubsection[{ht\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ ht\_\-get (
-\begin{DoxyParamCaption}
-\item[{{\bf ht\_\-table} $\ast$}]{table, }
-\item[{void $\ast$}]{key}
-\end{DoxyParamCaption}
-)}}
-\label{ht_8h_a5bc0ba0d31b944797e17a96372bce33e}
-
-
-Retrieves a value from the provided table.
-
-
-\begin{DoxyParams}{Parameters}
-{\em table} & The table in which to find the associated value. \\
-\hline
-{\em key} & The key to lookup.\\
-\hline
-\end{DoxyParams}
-\begin{DoxyReturn}{Returns}
-A pointer to the value associated with the provided key.
-\end{DoxyReturn}
-
-
-Definition at line 108 of file ht.c.
-
\hypertarget{ht_8h_a278174a0154a10b8b10b23937ca4c721}{
\index{ht.h@{ht.h}!ht\_\-hash\_\-string@{ht\_\-hash\_\-string}}
\index{ht\_\-hash\_\-string@{ht\_\-hash\_\-string}!ht.h@{ht.h}}
Takes a string key value and returns it's hashed value.
+This function takes a pointer to a string and returns a hash value based on the contents of the string.
+
\begin{DoxyParams}{Parameters}
{\em key} & Pointer to the string to hash.\\
-Here is the caller graph for this function:\nopagebreak
+Here is the caller graph for this function:
+\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\end{figure}
+\hypertarget{ht_8h_acb11ccfcef6f11d5e9ec31f14b875140}{
+\index{ht.h@{ht.h}!ht\_\-insert@{ht\_\-insert}}
+\index{ht\_\-insert@{ht\_\-insert}!ht.h@{ht.h}}
+\subsubsection[{ht\_\-insert}]{\setlength{\rightskip}{0pt plus 5cm}void ht\_\-insert (
+\begin{DoxyParamCaption}
+\item[{{\bf ht\_\-table} $\ast$}]{table, }
+\item[{void $\ast$}]{key, }
+\item[{void $\ast$}]{val}
+\end{DoxyParamCaption}
+)}}
+\label{ht_8h_acb11ccfcef6f11d5e9ec31f14b875140}
+
+
+Inserts a key/value pair into the provided table.
+
+This function inserts a new entry into the provided table containing the provided key and value pointers. The entry is placed in the table by hashing the key with the provided table's hash function. If an entry with an identical key exists, then the value pointer for that entry is changed to the provided value pointer. If free\_\-value is a non-\/zero value then the old value pointer is also freed.
+
+
+\begin{DoxyParams}{Parameters}
+{\em table} & The table to be freed. \\
+\hline
+{\em key} & The key for the associated value. \\
+\hline
+{\em val} & The value to be associated with the key. \\
+\hline
+{\em free\_\-value} & Determines whether or not to free the old value pointer. \\
+\hline
+\end{DoxyParams}
\hypertarget{ht_8h_a0a3e03a29413673acd8899d250cd0844}{
\index{ht.h@{ht.h}!ht\_\-new@{ht\_\-new}}
\index{ht\_\-new@{ht\_\-new}!ht.h@{ht.h}}
\label{ht_8h_a0a3e03a29413673acd8899d250cd0844}
-Creates a new hash table of the given size using the provided hash function or the built-\/in string hashing function otherwise.
+Creates a new hash table.
+
+This fucntion creates a new empty hash table with an internal lookup table of the given size and the desired hash function. The hash function will be used for insertion, deletion, and lookup of elements within the table. If the hash function pointer is null then ht\_\-hash\_\-string is used.
\begin{DoxyParams}{Parameters}
\end{figure}
-\hypertarget{ht_8h_a8c17c7288d2f510dd5c091cccc6dd056}{
-\index{ht.h@{ht.h}!ht\_\-put@{ht\_\-put}}
-\index{ht\_\-put@{ht\_\-put}!ht.h@{ht.h}}
-\subsubsection[{ht\_\-put}]{\setlength{\rightskip}{0pt plus 5cm}void ht\_\-put (
-\begin{DoxyParamCaption}
-\item[{{\bf ht\_\-table} $\ast$}]{table, }
-\item[{void $\ast$}]{key, }
-\item[{void $\ast$}]{val}
-\end{DoxyParamCaption}
-)}}
-\label{ht_8h_a8c17c7288d2f510dd5c091cccc6dd056}
-
-
-Inserts a key/value pair into the provided table.
-
-
-\begin{DoxyParams}{Parameters}
-{\em table} & The table to be freed. \\
-\hline
-{\em key} & The key for the associated value. \\
-\hline
-{\em val} & The value to be associated with the key. \\
-\hline
-\end{DoxyParams}
-
-
-Definition at line 73 of file ht.c.
-
\hypertarget{ht_8h_ad9cac6da8b459d5960079b0d95489960}{
\index{ht.h@{ht.h}!ht\_\-resize@{ht\_\-resize}}
\index{ht\_\-resize@{ht\_\-resize}!ht.h@{ht.h}}
Resizes the underlying table used for storing key/value pairs.
+This function allocates a new internal lookup table of the given size to replace the internal table for the provided hash table. After the new talbe is created, all entries from the old table are rehahsed and inserted into the new lookup table. The new lookup table then replaces the old lookup table and the old lookup table is freed.
+
\begin{DoxyParams}{Parameters}
{\em table} & The table to be resized. \\
-a648bcf8938db9ae20e8ca6124b91987
\ No newline at end of file
+5effe68ea7e27dd3011415a7f9133dc6
\ No newline at end of file
\vspace*{1cm}
{\large Generated by Doxygen 1.7.3}\\
\vspace*{0.5cm}
-{\small Fri Mar 23 2012 11:12:03}\\
+{\small Fri Mar 23 2012 12:45:04}\\
\end{center}
\end{titlepage}
\clearemptydoublepage
\hyperlink{structsll__node}{sll\_\-node} $\ast$ \hyperlink{sll_8c_acfe3ebc296fe75f1d0ee21195dd7b9bf}{sll\_\-push\_\-front} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list, void $\ast$contents)
\begin{DoxyCompactList}\small\item\em Adds a new node to the front of an existing linked list. \item\end{DoxyCompactList}\item
\hyperlink{structsll__node}{sll\_\-node} $\ast$ \hyperlink{sll_8c_af72e93329186ac936d2bf6f544aa1f6b}{sll\_\-pop\_\-back} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list)
-\begin{DoxyCompactList}\small\item\em Removes and returns a pointer to the last element of the list. \item\end{DoxyCompactList}\item
+\item
\hyperlink{structsll__node}{sll\_\-node} $\ast$ \hyperlink{sll_8c_a1588e5a1f90852ee48403d5313d64269}{sll\_\-pop\_\-front} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list)
-\begin{DoxyCompactList}\small\item\em Removes and returns a pointer to the first element of the list. \item\end{DoxyCompactList}\item
+\item
\hyperlink{structsll__node}{sll\_\-node} $\ast$ \hyperlink{sll_8c_a66769edc21579f71972ac90de6da4a9f}{sll\_\-insert} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list, int index, void $\ast$contents)
\begin{DoxyCompactList}\small\item\em Inserts a new node in a linked list at the specified index. \item\end{DoxyCompactList}\item
\hyperlink{structsll__node}{sll\_\-node} $\ast$ \hyperlink{sll_8c_afd494f171c24981f0d7a007841f21cfe}{sll\_\-delete} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list, int index, int free\_\-contents)
Finds and returns the last node in the supplied linked list.
+This function returns a pointer to the last node in the given linked list.
+
\begin{DoxyParams}{Parameters}
{\em list} & The linked list to search.\\
Deletes a node from the supplied list.
-Deletes the node found at the supplied index from the supplied list and frees the memory used by the node and its contents.
+This function traverses the list to the desired index and frees the memory allocated for that node. If the deleted node has a child then the child is reattached to the deleted node's parent. If free\_\-contents is passed a non-\/zero value then the node's contents pointer is also freed.
\begin{DoxyParams}{Parameters}
-{\em list} & \\
+{\em list} & The list to operate on. \\
\hline
-{\em index} & \\
+{\em index} & The index of the node to delete. \\
\hline
{\em free\_\-contents} & Whether or not to also free the contents of the node.\\
\hline
Frees all memory used by a linked list.
-Loops through the supplied list and frees all nodes. Also frees contents if free\_\-contents is passed TRUE. This is to avoid trying to free memory allocated on the stack.
+This function loops through the supplied list and frees all nodes. Also frees contents if free\_\-contents is passed a non-\/zero value.
\begin{DoxyParams}{Parameters}
Finds and returns the first node in the supplied linked list.
+This function returns a pointer to the first node in the given linked list.
+
\begin{DoxyParams}{Parameters}
{\em list} & The linked list to search.\\
Return the node at the specified index in a linked list.
-Loops through the linked list and returns the node in the list at the specified index. Returns NULL if the index is out of range.
+This function loops through the linked list and returns the node in the list at the specified index. Returns NULL if the index is out of range.
\begin{DoxyParams}{Parameters}
Inserts a new node in a linked list at the specified index.
+This function traverses the list to the desired index and inserts a new node with the given contents at that position. The node previously at the desired index becomes the child of the new node.
+
\begin{DoxyParams}{Parameters}
-{\em list} & \\
+{\em list} & The list to operate on. \\
\hline
-{\em index} & \\
+{\em index} & The index where the new node will be inserted. \\
\hline
-{\em contents} & \\
+{\em contents} & The contents of the new node.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns the number of elements in the list.
-Loops through the supplied list and returns a count of the number of elements contained in the list.
+This function loops through the supplied list and returns a count of the number of elements contained in the list.
\begin{DoxyParams}{Parameters}
Creates a new linked list node with the supplied value.
-This function allocates a new node on the heap and populates the node contents with the supplied contents pointer.
+This function allocates a new node and populates the node contents with the supplied contents pointer.
\begin{DoxyParams}{Parameters}
\label{sll_8c_af72e93329186ac936d2bf6f544aa1f6b}
-Removes and returns a pointer to the last element of the list.
-
-
-\begin{DoxyParams}{Parameters}
-{\em list} & \\
-\hline
-{\em contents} & \\
-\hline
-\end{DoxyParams}
-\begin{DoxyReturn}{Returns}
-Pointer to the newly added node.
-\end{DoxyReturn}
-
-
Definition at line 80 of file sll.c.
\hypertarget{sll_8c_a1588e5a1f90852ee48403d5313d64269}{
\label{sll_8c_a1588e5a1f90852ee48403d5313d64269}
-Removes and returns a pointer to the first element of the list.
-
-
-\begin{DoxyParams}{Parameters}
-{\em list} & \\
-\hline
-{\em contents} & \\
-\hline
-\end{DoxyParams}
-\begin{DoxyReturn}{Returns}
-Pointer to the newly added node.
-\end{DoxyReturn}
-
-
Definition at line 84 of file sll.c.
\hypertarget{sll_8c_a19ad0a86a87451a3ab68ad6d18c3e3e0}{
Adds a new node to the end of an existing linked list.
+This function creates a new node and pushes it to the end of the given list. The newly created node becomes the new tail of the list.
+
\begin{DoxyParams}{Parameters}
-{\em list} & \\
+{\em list} & The list to operate on. \\
\hline
-{\em contents} & \\
+{\em contents} & The contents of the new node.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Adds a new node to the front of an existing linked list.
+This function creates a new node and pushes it to the beginning of the given list. The newly created node becomes the new head of the list.
+
\begin{DoxyParams}{Parameters}
-{\em list} & \\
+{\em list} & The list to operate on. \\
\hline
-{\em contents} & \\
+{\em contents} & The contents of the new node.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\begin{DoxyCompactList}\small\item\em Finds and returns the last node in the supplied linked list. \item\end{DoxyCompactList}\item
\hyperlink{structsll__node}{sll\_\-node} $\ast$ \hyperlink{sll_8h_a0582f263482ead73d53b018978513540}{sll\_\-index} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list, int index)
\begin{DoxyCompactList}\small\item\em Return the node at the specified index in a linked list. \item\end{DoxyCompactList}\item
-\hyperlink{structsll__node}{sll\_\-node} $\ast$ \hyperlink{sll_8h_a19ad0a86a87451a3ab68ad6d18c3e3e0}{sll\_\-push\_\-back} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list, void $\ast$contents)
-\begin{DoxyCompactList}\small\item\em Adds a new node to the end of an existing linked list. \item\end{DoxyCompactList}\item
\hyperlink{structsll__node}{sll\_\-node} $\ast$ \hyperlink{sll_8h_acfe3ebc296fe75f1d0ee21195dd7b9bf}{sll\_\-push\_\-front} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list, void $\ast$contents)
\begin{DoxyCompactList}\small\item\em Adds a new node to the front of an existing linked list. \item\end{DoxyCompactList}\item
-\hyperlink{structsll__node}{sll\_\-node} $\ast$ \hyperlink{sll_8h_af72e93329186ac936d2bf6f544aa1f6b}{sll\_\-pop\_\-back} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list)
-\begin{DoxyCompactList}\small\item\em Removes and returns a pointer to the last element of the list. \item\end{DoxyCompactList}\item
-\hyperlink{structsll__node}{sll\_\-node} $\ast$ \hyperlink{sll_8h_a1588e5a1f90852ee48403d5313d64269}{sll\_\-pop\_\-front} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list)
+\hyperlink{structsll__node}{sll\_\-node} $\ast$ \hyperlink{sll_8h_a19ad0a86a87451a3ab68ad6d18c3e3e0}{sll\_\-push\_\-back} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list, void $\ast$contents)
+\begin{DoxyCompactList}\small\item\em Adds a new node to the end of an existing linked list. \item\end{DoxyCompactList}\item
+void \hyperlink{sll_8h_a6702f6f18b540bd21165295eb3ca5c25}{sll\_\-pop\_\-front} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list, int free\_\-contents)
\begin{DoxyCompactList}\small\item\em Removes and returns a pointer to the first element of the list. \item\end{DoxyCompactList}\item
+void \hyperlink{sll_8h_a58add98a437335c8f927344215a40d11}{sll\_\-pop\_\-back} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list, int free\_\-contents)
+\begin{DoxyCompactList}\small\item\em Removes and returns a pointer to the last element of the list. \item\end{DoxyCompactList}\item
\hyperlink{structsll__node}{sll\_\-node} $\ast$ \hyperlink{sll_8h_a66769edc21579f71972ac90de6da4a9f}{sll\_\-insert} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list, int index, void $\ast$contents)
\begin{DoxyCompactList}\small\item\em Inserts a new node in a linked list at the specified index. \item\end{DoxyCompactList}\item
\hyperlink{structsll__node}{sll\_\-node} $\ast$ \hyperlink{sll_8h_afd494f171c24981f0d7a007841f21cfe}{sll\_\-delete} (\hyperlink{structsll__node}{sll\_\-node} $\ast$list, int index, int free\_\-contents)
Finds and returns the last node in the supplied linked list.
+This function returns a pointer to the last node in the given linked list.
+
\begin{DoxyParams}{Parameters}
{\em list} & The linked list to search.\\
Deletes a node from the supplied list.
-Deletes the node found at the supplied index from the supplied list and frees the memory used by the node and its contents.
+This function traverses the list to the desired index and frees the memory allocated for that node. If the deleted node has a child then the child is reattached to the deleted node's parent. If free\_\-contents is passed a non-\/zero value then the node's contents pointer is also freed.
\begin{DoxyParams}{Parameters}
-{\em list} & \\
+{\em list} & The list to operate on. \\
\hline
-{\em index} & \\
+{\em index} & The index of the node to delete. \\
\hline
{\em free\_\-contents} & Whether or not to also free the contents of the node.\\
\hline
Frees all memory used by a linked list.
-Loops through the supplied list and frees all nodes. Also frees contents if free\_\-contents is passed TRUE. This is to avoid trying to free memory allocated on the stack.
+This function loops through the supplied list and frees all nodes. Also frees contents if free\_\-contents is passed a non-\/zero value.
\begin{DoxyParams}{Parameters}
Finds and returns the first node in the supplied linked list.
+This function returns a pointer to the first node in the given linked list.
+
\begin{DoxyParams}{Parameters}
{\em list} & The linked list to search.\\
Return the node at the specified index in a linked list.
-Loops through the linked list and returns the node in the list at the specified index. Returns NULL if the index is out of range.
+This function loops through the linked list and returns the node in the list at the specified index. Returns NULL if the index is out of range.
\begin{DoxyParams}{Parameters}
Inserts a new node in a linked list at the specified index.
+This function traverses the list to the desired index and inserts a new node with the given contents at that position. The node previously at the desired index becomes the child of the new node.
+
\begin{DoxyParams}{Parameters}
-{\em list} & \\
+{\em list} & The list to operate on. \\
\hline
-{\em index} & \\
+{\em index} & The index where the new node will be inserted. \\
\hline
-{\em contents} & \\
+{\em contents} & The contents of the new node.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns the number of elements in the list.
-Loops through the supplied list and returns a count of the number of elements contained in the list.
+This function loops through the supplied list and returns a count of the number of elements contained in the list.
\begin{DoxyParams}{Parameters}
Creates a new linked list node with the supplied value.
-This function allocates a new node on the heap and populates the node contents with the supplied contents pointer.
+This function allocates a new node and populates the node contents with the supplied contents pointer.
\begin{DoxyParams}{Parameters}
\end{figure}
-\hypertarget{sll_8h_af72e93329186ac936d2bf6f544aa1f6b}{
+\hypertarget{sll_8h_a58add98a437335c8f927344215a40d11}{
\index{sll.h@{sll.h}!sll\_\-pop\_\-back@{sll\_\-pop\_\-back}}
\index{sll\_\-pop\_\-back@{sll\_\-pop\_\-back}!sll.h@{sll.h}}
-\subsubsection[{sll\_\-pop\_\-back}]{\setlength{\rightskip}{0pt plus 5cm}{\bf sll\_\-node}$\ast$ sll\_\-pop\_\-back (
+\subsubsection[{sll\_\-pop\_\-back}]{\setlength{\rightskip}{0pt plus 5cm}void sll\_\-pop\_\-back (
\begin{DoxyParamCaption}
-\item[{{\bf sll\_\-node} $\ast$}]{list}
+\item[{{\bf sll\_\-node} $\ast$}]{list, }
+\item[{int}]{free\_\-contents}
\end{DoxyParamCaption}
)}}
-\label{sll_8h_af72e93329186ac936d2bf6f544aa1f6b}
+\label{sll_8h_a58add98a437335c8f927344215a40d11}
Removes and returns a pointer to the last element of the list.
+This function removes the last node from the list and frees it's associated memory. If free\_\-contents is passed a non-\/zero value then it's contents pointer is also freed. The second to last node in the list becomes the new tail of the list.
+
\begin{DoxyParams}{Parameters}
-{\em list} & \\
+{\em list} & The list to operate on. \\
\hline
-{\em contents} & \\
+{\em free\_\-contents} & Determines whether to free the contents pointer.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the newly added node.
\end{DoxyReturn}
-
-
-Definition at line 80 of file sll.c.
-
-\hypertarget{sll_8h_a1588e5a1f90852ee48403d5313d64269}{
+\hypertarget{sll_8h_a6702f6f18b540bd21165295eb3ca5c25}{
\index{sll.h@{sll.h}!sll\_\-pop\_\-front@{sll\_\-pop\_\-front}}
\index{sll\_\-pop\_\-front@{sll\_\-pop\_\-front}!sll.h@{sll.h}}
-\subsubsection[{sll\_\-pop\_\-front}]{\setlength{\rightskip}{0pt plus 5cm}{\bf sll\_\-node}$\ast$ sll\_\-pop\_\-front (
+\subsubsection[{sll\_\-pop\_\-front}]{\setlength{\rightskip}{0pt plus 5cm}void sll\_\-pop\_\-front (
\begin{DoxyParamCaption}
-\item[{{\bf sll\_\-node} $\ast$}]{list}
+\item[{{\bf sll\_\-node} $\ast$}]{list, }
+\item[{int}]{free\_\-contents}
\end{DoxyParamCaption}
)}}
-\label{sll_8h_a1588e5a1f90852ee48403d5313d64269}
+\label{sll_8h_a6702f6f18b540bd21165295eb3ca5c25}
Removes and returns a pointer to the first element of the list.
+This function removes the first node from the list and frees it's associated memory. If free\_\-contents is passed a non-\/zero value then it's contents pointer is also freed. The second node in the list becomes the new head of the list.
+
\begin{DoxyParams}{Parameters}
-{\em list} & \\
+{\em list} & The lsit to operate on. \\
\hline
-{\em contents} & \\
+{\em free\_\-contents} & Determines whether to free the contents pointer.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the newly added node.
\end{DoxyReturn}
-
-
-Definition at line 84 of file sll.c.
-
\hypertarget{sll_8h_a19ad0a86a87451a3ab68ad6d18c3e3e0}{
\index{sll.h@{sll.h}!sll\_\-push\_\-back@{sll\_\-push\_\-back}}
\index{sll\_\-push\_\-back@{sll\_\-push\_\-back}!sll.h@{sll.h}}
Adds a new node to the end of an existing linked list.
+This function creates a new node and pushes it to the end of the given list. The newly created node becomes the new tail of the list.
+
\begin{DoxyParams}{Parameters}
-{\em list} & \\
+{\em list} & The list to operate on. \\
\hline
-{\em contents} & \\
+{\em contents} & The contents of the new node.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Adds a new node to the front of an existing linked list.
+This function creates a new node and pushes it to the beginning of the given list. The newly created node becomes the new head of the list.
+
\begin{DoxyParams}{Parameters}
-{\em list} & \\
+{\em list} & The list to operate on. \\
\hline
-{\em contents} & \\
+{\em contents} & The contents of the new node.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
-Collaboration diagram for ht\_\-table:
-\nopagebreak
+Collaboration diagram for ht\_\-table:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
return table;
}
-void ht_free(ht_table* table)
+void ht_free(ht_table* table, int free_key, int free_value)
{
int i = 0;
for (i = 0; i < table->size; i++)
}
}
-int ht_put(ht_table* table, void* key, void* val)
+void ht_put(ht_table* table, void* key, void* val)
{
unsigned int index = table->hash_func( key ) % table->size;
ht_node* cur = table->table[index];
table->table[ index ] = node;
}
}
- return 1;
}
-void* ht_get(ht_table* table, char* key)
+void* ht_get(ht_table* table, void* key)
{
void* ret = NULL;
unsigned int index= table->hash_func( key ) % table->size;
return ret;
}
-unsigned int ht_delete(ht_table* table, char* key)
+void ht_delete(ht_table* table, void* key, int free_key, int free_value)
{
return 0;
}
-unsigned int ht_resize(ht_table* table, unsigned int size)
+ht_table* ht_resize(ht_table* table, unsigned int size)
{
return 0;
}
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
-#ifndef HASHTABLE_H
-#define HASHTABLE_H
+#ifndef HT_H
+#define HT_H
//! Hash function for hashing keys in a hash table
typedef unsigned int (*ht_hash_func) (void*);
//! A node in a hash table.
-typedef struct node
+typedef struct ht_node
{
//! Pointer to the key
void* key;
/**
* @brief Takes a string key value and returns it's hashed value.
*
- * @param key Pointer to the string to hash.
+ * This function takes a pointer to a string and returns a hash value based on
+ * the contents of the string.
+ *
+ * @param key Pointer to the string to hash.
*
* @return The hashed value of the key.
**/
unsigned int ht_hash_string(void* key);
/**
- * @brief Creates a new hash table of the given size using the provided hash function
- * or the built-in string hashing function otherwise.
+ * @brief Creates a new hash table
+ *
+ * This fucntion creates a new empty hash table with an internal lookup table
+ * of the given size and the desired hash function. The hash function will be
+ * used for insertion, deletion, and lookup of elements within the table. If
+ * the hash function pointer is null then ht_hash_string is used.
*
* @param size The size of the table to use for storing data.
* @param fn The function to use for hasing keys.
/**
* @brief Frees all memory used by the provided hash table.
*
+ * This function frees all memory allocated for the given table. If free_key or
+ * free_value are non-zero values then the key or value pointers are freed
+ * respectively.
+ *
* @param table The table to be freed.
* @param free_key Determines whether the key pointers will be freed.
* @param free_value Determines whether the value pointers will be freed.
/**
* @brief Inserts a key/value pair into the provided table.
*
- * @param table The table to be freed.
- * @param key The key for the associated value.
- * @param val The value to be associated with the key.
+ * This function inserts a new entry into the provided table containing the
+ * provided key and value pointers. The entry is placed in the table by hashing
+ * the key with the provided table's hash function. If an entry with an
+ * identical key exists, then the value pointer for that entry is changed to
+ * the provided value pointer. If free_value is a non-zero value then the old
+ * value pointer is also freed.
+ *
+ * @param table The table to be freed.
+ * @param key The key for the associated value.
+ * @param val The value to be associated with the key.
+ * @param free_value Determines whether or not to free the old value pointer.
**/
-void ht_put(ht_table* table, void* key, void* val);
+void ht_insert(ht_table* table, void* key, void* val);
/**
* @brief Retrieves a value from the provided table.
*
+ * This function looks up an entry in the table by hashing the key with the
+ * table's hash function. It then returns the pointer to the value of the found
+ * entry or a null pointer if no entry was found.
+ *
* @param table The table in which to find the associated value.
* @param key The key to lookup.
*
* @return A pointer to the value associated with the provided key.
**/
-void* ht_get(ht_table* table, void* key);
+void* ht_find(ht_table* table, void* key);
/**
* @brief Deletes a key/value pair from the provided hash table.
*
+ * This function looks up an entry in the table by hashing the key with the
+ * table's hash function. If an entry is found then the memory allocated for
+ * the entry is freed. If free_key or free_value are non-zero values then the
+ * key or value pointers are freed respectively.
+ *
* @param table The table from which the key/value pait will be deleted.
* @param key The key for the key/value pair to be deleted.
* @param free_key Determines whether the key pointer will be freed.
/**
* @brief Resizes the underlying table used for storing key/value pairs.
*
+ * This function allocates a new internal lookup table of the given size to
+ * replace the internal table for the provided hash table. After the new talbe
+ * is created, all entries from the old table are rehahsed and inserted into
+ * the new lookup table. The new lookup table then replaces the old lookup
+ * table and the old lookup table is freed.
+ *
* @param table The table to be resized.
* @param size The new size for the table.
*
#include "sll.h"
#include <stdlib.h>
-/******************************************************************************
- * Public Functions
- ******************************************************************************/
sll_node* sll_new( void* contents )
{
sll_node* list = (sll_node*)malloc( sizeof(sll_node) );
return list;
}
-sll_node* sll_last( sll_node* list )
+sll_node* sll_front( sll_node* list )
+{
+}
+
+sll_node* sll_back( sll_node* list )
{
sll_node* node = list;
while((node != NULL) && (node->next != NULL))
return node;
}
-sll_node* sll_get( sll_node* list, int index )
+sll_node* sll_index( sll_node* list, int index )
{
int current = 0;
sll_node* node = list;
return indexed_node;
}
-sll_node* sll_add( sll_node* list, void* contents )
+sll_node* sll_push_back( sll_node* list, void* contents )
{
- sll_node* node = sll_last( list );
+ sll_node* node = sll_back( list );
node->next = sll_new( contents );
}
+sll_node* sll_push_front( sll_node* list, void* contents )
+{
+}
+
+sll_node* sll_pop_back( sll_node* list )
+{
+}
+
+sll_node* sll_pop_front( sll_node* list )
+{
+}
+
sll_node* sll_insert( sll_node* list, int index, void* contents )
{
int req_index = ((index-1) < 0) ? 0 : index-1;
- sll_node* node = sll_get( list, req_index );
+ sll_node* node = sll_index( list, req_index );
if(node != NULL)
{
sll_node* next_next = node->next;
sll_node* sll_delete( sll_node* list, int index, int free_contents)
{
- sll_node* node = sll_get( list, (index-1));
+ sll_node* node = sll_index( list, (index-1));
if((node != NULL) && (node->next != NULL))
{
sll_node* node_to_delete = node->next;
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
-#ifndef LINKED_LIST_H
-#define LINKED_LIST_H
+#ifndef SLL_H
+#define SLL_H
-typedef struct node
+//! A linked list node.
+typedef struct sll_node
{
+ //! Pointer to the contents the node
void* contents;
- struct node* next;
+ //! Pointer to next node in the list.
+ struct sll_node* next;
} sll_node;
/**
- * @brief Creates a new linked list node with the supplied value.
+ * @brief Creates a new linked list node with the supplied value.
*
- * Allocates a new node on the heap and populates the node contents with the
+ * This function allocates a new node and populates the node contents with the
* supplied contents pointer.
*
- * @param contents The contents of the newly created node.
+ * @param contents The contents of the newly created node.
*
- * @return A pointer to the newly created node.
- * */
+ * @return A pointer to the newly created node.
+ **/
sll_node* sll_new( void* contents );
/**
- * @brief Finds and returns the last node in the supplied linked list.
+ * @brief Finds and returns the first node in the supplied linked list.
+ *
+ * This function returns a pointer to the first node in the given linked list.
+ *
+ * @param list The linked list to search.
+ *
+ * @return Pointer to the last node in the supplied list.
+ **/
+sll_node* sll_front(sll_node* list);
+
+/**
+ * @brief Finds and returns the last node in the supplied linked list.
+ *
+ * This function returns a pointer to the last node in the given linked list.
*
- * @param list The linked list to search.
+ * @param list The linked list to search.
*
- * @return Pointer to the last node in the supplied list.
- * */
-sll_node* sll_last(sll_node* list);
+ * @return Pointer to the last node in the supplied list.
+ **/
+sll_node* sll_back(sll_node* list);
/**
* @brief Return the node at the specified index in a linked list.
*
- * Loops through the linked list and returns the node in the list at the
- * specified index. Returns NULL if the index is out of range.
+ * This function loops through the linked list and returns the node in the list
+ * at the specified index. Returns NULL if the index is out of range.
*
- * @param list The list to search for the supplied index.
- * @param index The index of the node to return.
+ * @param list The list to search for the supplied index.
+ * @param index The index of the node to return.
*
- * @return A pointer to the node and the supplied index, NULL if out of range.
- * */
-sll_node* sll_get(sll_node* list, int index);
+ * @return A pointer to the node and the supplied index, NULL if out of range.
+ **/
+sll_node* sll_index(sll_node* list, int index);
/**
- * @brief Adds a new node to an existing linked list.
+ * @brief Adds a new node to the front of an existing linked list.
*
- * @param list
- * @param contents
+ * This function creates a new node and pushes it to the beginning of the given
+ * list. The newly created node becomes the new head of the list.
+ *
+ * @param list The list to operate on.
+ * @param contents The contents of the new node.
*
* @return Pointer to the newly added node.
- * */
-sll_node* sll_add( sll_node* list, void* contents );
+ **/
+sll_node* sll_push_front( sll_node* list, void* contents );
+
+/**
+ * @brief Adds a new node to the end of an existing linked list.
+ *
+ * This function creates a new node and pushes it to the end of the given list.
+ * The newly created node becomes the new tail of the list.
+ *
+ * @param list The list to operate on.
+ * @param contents The contents of the new node.
+ *
+ * @return Pointer to the newly added node.
+ **/
+sll_node* sll_push_back( sll_node* list, void* contents );
/**
- * @brief Inserts a new node in a linked list at the specified index.
+ * @brief Removes and returns a pointer to the first element of the list.
*
- * @param list
- * @param index
- * @param contents
+ * This function removes the first node from the list and frees it's associated
+ * memory. If free_contents is passed a non-zero value then it's contents
+ * pointer is also freed. The second node in the list becomes the new head of
+ * the list.
*
- * @return Pointer to the newly inserted node, NULL if index is out of range.
- * */
+ * @param list The lsit to operate on.
+ * @param free_contents Determines whether to free the contents pointer.
+ *
+ * @return Pointer to the newly added node.
+ **/
+void sll_pop_front( sll_node* list, int free_contents );
+
+/**
+ * @brief Removes and returns a pointer to the last element of the list.
+ *
+ * This function removes the last node from the list and frees it's associated
+ * memory. If free_contents is passed a non-zero value then it's contents
+ * pointer is also freed. The second to last node in the list becomes the new
+ * tail of the list.
+ *
+ * @param list The list to operate on.
+ * @param free_contents Determines whether to free the contents pointer.
+ *
+ * @return Pointer to the newly added node.
+ **/
+void sll_pop_back( sll_node* list, int free_contents );
+
+/**
+ * @brief Inserts a new node in a linked list at the specified index.
+ *
+ * This function traverses the list to the desired index and inserts a new node
+ * with the given contents at that position. The node previously at the desired
+ * index becomes the child of the new node.
+ *
+ * @param list The list to operate on.
+ * @param index The index where the new node will be inserted.
+ * @param contents The contents of the new node.
+ *
+ * @return Pointer to the newly inserted node, NULL if index is out of range.
+ **/
sll_node* sll_insert( sll_node* list, int index, void* contents);
/**
- * @brief Deletes a node from the supplied list.
+ * @brief Deletes a node from the supplied list.
*
- * Deletes the node found at the supplied index from the supplied list and frees
- * the memory used by the node and its contents.
+ * This function traverses the list to the desired index and frees the memory
+ * allocated for that node. If the deleted node has a child then the child is
+ * reattached to the deleted node's parent. If free_contents is passed a
+ * non-zero value then the node's contents pointer is also freed.
*
- * @param list
- * @param index
- * @param free_contents Whether or not to also free the contents of the node.
+ * @param list The list to operate on.
+ * @param index The index of the node to delete.
+ * @param free_contents Whether or not to also free the contents of the node.
*
* @return Pointer to the node that is now at the supplied index.
- * */
+ **/
sll_node* sll_delete( sll_node* list, int index, int free_contents);
/**
- * @brief Frees all memory used by a linked list.
+ * @brief Frees all memory used by a linked list.
*
- * Loops through the supplied list and frees all nodes. Also frees contents if
- * free_contents is passed TRUE. This is to avoid trying to free memory
- * allocated on the stack.
+ * This function loops through the supplied list and frees all nodes.
+ * Also frees contents if free_contents is passed a non-zero value.
*
- * @param list The list to be freed.
- * @param free_contents Whether or not to also free the contents of each node.
- * */
+ * @param list The list to be freed.
+ * @param free_contents Whether or not to also free the contents of each node.
+ **/
void sll_free( sll_node* list, int free_contents);
/**
* @brief Returns the number of elements in the list.
*
- * Loops through the supplied list and returns a count of the number of elements
- * contained in the list.
+ * This function loops through the supplied list and returns a count of the
+ * number of elements contained in the list.
*
- * @param list The list to be counted.
+ * @param list The list to be counted.
*
* @return The number of elements in the list.
**/
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
+#include "bt.h"
+
+bt_tree* bt_new(bt_compare_func compare)
+{
+
+}
+
+void bt_free(bt_tree* tree, int free_contents)
+{
+
+}
+
+int bt_compare_ptr(void* obj1, void* obj2)
+{
+
+}
+
+void bt_insert(bt_tree* tree, void* data)
+{
+
+}
+
+void bt_delete(bt_tree* tree, void* data)
+{
+
+}
+
+void* bt_find(bt_tree* tree, void* data)
+{
+
+}
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
+#ifndef BT_H
+#define BT_H
+//! A function pointer for a comparison function.
+typedef int (* bt_compare_func) (void*,void*);
+
+//! A binary tree node.
+typedef struct bt_node
+{
+ //! The contents of the tree node.
+ void* contents;
+ //! The left child of the tree node.
+ struct bt_node* left;
+ //! the right child of the tree node.
+ struct bt_node* right;
+} bt_node;
+
+//! A binary tree
+typedef struct bt_tree
+{
+ //! The root of the binary tree
+ bt_node* root;
+ //! The function used to compare data
+ bt_compare_func compare;
+} bt_tree;
+
+/**
+ * @brief Creates a new empty binary tree.
+ *
+ * This function creates a new empty binary search tree with the given
+ * comparison function. The comparison function will be used during searching,
+ * insertions, and deletions, to find and traverse the tree.
+ *
+ * @param compare The function to use for comparing items in the tree.
+ *
+ * @return Pointer to the newly created tree.
+ **/
+bt_tree* bt_new(bt_compare_func compare);
+
+/**
+ * @brief Frees the memory allocated for all nodes of a tree.
+ *
+ * This function frees all memory associated with the given tree. If
+ * free_contents has a non-zero value then the contents pointer of each node
+ * will aslo be freed.
+ *
+ * @param tree The tree to be freed.
+ * @param free_contents Determines whether the contents pointers will be freed.
+ **/
+void bt_free(bt_tree* tree, int free_contents);
+
+/**
+ * @brief Compares the value of two pointers.
+ *
+ * This function takes two pointers and compares their values returning an
+ * integral value representing the result of the comparison. A return value of
+ * zero indicates the pointers are equal. A positive value indicates that obj2
+ * is greater than obj1 and a negative value indicates the opposite.
+ *
+ * @param obj1 The first object to be compared.
+ * @param obj2 The second object to be compared.
+ *
+ * @return The result of the comparison.
+ **/
+int bt_compare_ptr(void* obj1, void* obj2);
+
+/**
+ * @brief Inserts a new node into the tree.
+ *
+ * This function uses the tree's compare function to traverse the tree until an
+ * existing node with the given data is found or until a leaf node is reached.
+ * If a node exists containing the given data then no insertion is performed.
+ * If a leaf node is reached then the a new leaf node is created and set as the
+ * left or right child of that leaf node.
+ *
+ * @param tree The tree in which the node will be inserted.
+ * @param data The data that the new node will contain.
+ **/
+void bt_insert(bt_tree* tree, void* data);
+
+/**
+ * @brief Deletes a node for the tree.
+ *
+ * This function uses the tree's compare function to search the tree for a node
+ * containing the given data. If a node containing the data is found then the
+ * node is freed otherwise no deletion is performed. If free_contents is passed
+ * a non-zero value then the contents pointer of the node is also freed.
+ *
+ * @param tree The tree from which the node will be deleted.
+ * @param data The data to search for in the tree.
+ * @param free_contents Determines whether the contents pointer will be freed.
+ **/
+void bt_delete(bt_tree* tree, void* data, int free_contents);
+
+/**
+ * @brief Finds and returns the data from a node containing the given data.
+ *
+ * This function uses the tree's compare function to search the tree for a node
+ * containing the given data. If a node containing the given data is found then
+ * the pointer to the contents of the node is returned. Otherwise a null
+ * pointer is returned.
+ *
+ * @param tree The tree to be searched.
+ * @param data The data to be searched for.
+ *
+ * @return Pointer to the found data.
+ **/
+void* bt_find(bt_tree* tree, void* data);
+
+#endif
--- /dev/null
+#include "unity.h"
+
+// File Under Test
+#include "bt.h"
+
+void setUp()
+{
+}
+
+void tearDown()
+{
+}
+
+//-----------------------------------------------------------------------------
+
+