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

📄 avltree_8h.html

📁 常用的数据结构和算法函数库
💻 HTML
📖 第 1 页 / 共 3 页
字号:
          <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>Search an AVL tree for a value corresponding to a particular key. <p>This uses the tree as a mapping. Note that this performs identically to <a class="el" href="avltree_8h.html#a8">avltree_lookup_node</a>, except that the value at the node is returned rather than the node itself.<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 AVL tree to search. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>The key to search for. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The value associated with the given key, or NULL if no entry with the given key is found.</dd></dl>    </td>  </tr></table><a class="anchor" name="a8"></a><!-- doxytag: member="avltree.h::avltree_lookup_node" ref="a8" 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"><a class="el" href="avltree_8h.html#a1">AVLTreeNode</a>* avltree_lookup_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>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>Search an AVL tree for a node with a particular key. <p>This uses the tree as a mapping.<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 AVL tree to search. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>The key to search for. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The tree node containing the given key, or NULL if no entry with the given key is found.</dd></dl>    </td>  </tr></table><a class="anchor" name="a3"></a><!-- doxytag: member="avltree.h::avltree_new" ref="a3" args="(AVLTreeCompareFunc compare_func)" --><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#a0">AVLTree</a>* avltree_new           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="avltree_8h.html#a2">AVLTreeCompareFunc</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>compare_func</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>Create a new AVL 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>compare_func</em>&nbsp;</td><td>Function to use when comparing keys in the tree. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>A new AVL tree.</dd></dl>    </td>  </tr></table><a class="anchor" name="a11"></a><!-- doxytag: member="avltree.h::avltree_node_key" ref="a11" 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">void* avltree_node_key           </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>Retrieve the key for 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 key to the given node.</dd></dl>    </td>  </tr></table><a class="anchor" name="a13"></a><!-- doxytag: member="avltree.h::avltree_node_left_child" ref="a13" 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"><a class="el" href="avltree_8h.html#a1">AVLTreeNode</a>* avltree_node_left_child           </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 left child of 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 left child of the tree node, or NULL if the node has no left child.</dd></dl>    </td>  </tr></table><a class="anchor" name="a15"></a><!-- doxytag: member="avltree.h::avltree_node_parent" ref="a15" 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"><a class="el" href="avltree_8h.html#a1">AVLTreeNode</a>* avltree_node_parent           </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 parent node of 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 parent node of the tree node, or NULL if this is the root node.</dd></dl>    </td>  </tr></table><a class="anchor" name="a14"></a><!-- doxytag: member="avltree.h::avltree_node_right_child" ref="a14" 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"><a class="el" href="avltree_8h.html#a1">AVLTreeNode</a>* avltree_node_right_child           </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 right child of 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 right child of the tree node, or NULL if the node has no right child.</dd></dl>    </td>  </tr></table><a class="anchor" name="a12"></a><!-- doxytag: member="avltree.h::avltree_node_value" ref="a12" 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">void* avltree_node_value           </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>

⌨️ 快捷键说明

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