⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 avltree_8h.html

📁 常用的数据结构和算法函数库
💻 HTML
📖 第 1 页 / 共 3 页
字号:
          <td class="mdname1" valign="top" nowrap> <em>node</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Retrieve the value at a given tree node. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>node</em>&nbsp;</td><td>The tree node. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The value at the given node.</dd></dl>    </td>  </tr></table><a class="anchor" name="a18"></a><!-- doxytag: member="avltree.h::avltree_num_entries" ref="a18" args="(AVLTree *tree)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">int avltree_num_entries           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="avltree_8h.html#a0">AVLTree</a> *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>tree</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Retrieve the number of entries in the tree. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>tree</em>&nbsp;</td><td>The tree. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The number of key-value pairs stored in the tree.</dd></dl>    </td>  </tr></table><a class="anchor" name="a7"></a><!-- doxytag: member="avltree.h::avltree_remove" ref="a7" args="(AVLTree *tree, void *key)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">int avltree_remove           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="avltree_8h.html#a0">AVLTree</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>tree</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>void *&nbsp;</td>          <td class="mdname" nowrap> <em>key</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Remove an entry from a tree, specifying the key of the node to remove. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>tree</em>&nbsp;</td><td>The tree. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>The key of the node to remove. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>Zero (false) if no node with the specified key was found in the tree, non-zero (true) if a node with the specified key was removed.</dd></dl>    </td>  </tr></table><a class="anchor" name="a6"></a><!-- doxytag: member="avltree.h::avltree_remove_node" ref="a6" args="(AVLTree *tree, AVLTreeNode *node)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void avltree_remove_node           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="avltree_8h.html#a0">AVLTree</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>tree</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="avltree_8h.html#a1">AVLTreeNode</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>node</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Remove a node from a tree. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>tree</em>&nbsp;</td><td>The tree. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>node</em>&nbsp;</td><td>The node to remove</td></tr>  </table></dl>    </td>  </tr></table><a class="anchor" name="a10"></a><!-- doxytag: member="avltree.h::avltree_root_node" ref="a10" args="(AVLTree *tree)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"><a class="el" href="avltree_8h.html#a1">AVLTreeNode</a>* avltree_root_node           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="avltree_8h.html#a0">AVLTree</a> *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>tree</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Find the root node of a tree. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>tree</em>&nbsp;</td><td>The tree. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The root node of the tree, or NULL if the tree is empty.</dd></dl>    </td>  </tr></table><a class="anchor" name="a16"></a><!-- doxytag: member="avltree.h::avltree_subtree_height" ref="a16" args="(AVLTreeNode *node)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">int avltree_subtree_height           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="avltree_8h.html#a1">AVLTreeNode</a> *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>node</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Find the height of a subtree. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>node</em>&nbsp;</td><td>The root node of the subtree. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The height of the subtree.</dd></dl>    </td>  </tr></table><a class="anchor" name="a17"></a><!-- doxytag: member="avltree.h::avltree_to_array" ref="a17" args="(AVLTree *tree)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void** avltree_to_array           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="avltree_8h.html#a0">AVLTree</a> *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>tree</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Convert the keys in an AVL tree into a C array. <p>This allows the tree to be used as an ordered set.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>tree</em>&nbsp;</td><td>The tree. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>A newly allocated C array containing all the keys in the tree, in order. The length of the array is equal to the number of entries in the tree (see <a class="el" href="avltree_8h.html#a18">avltree_num_entries</a>).</dd></dl>    </td>  </tr></table><hr size="1"><address style="align: right;"><small>Generated on Mon Jan 30 18:56:23 2006 for C Algorithms by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -