123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title><%GLibTraverseType>: </title>
- <meta name="generator" content="DocBook XSL Stylesheets V1.79.2">
- <link rel="home" href="index.html" title="">
- <link rel="up" href="ch01.html" title="GLib">
- <link rel="prev" href="re71.html" title="<%GLibTraverseFlags>">
- <link rel="next" href="re73.html" title="<GTree>">
- <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
- <link rel="stylesheet" href="style.css" type="text/css">
- </head>
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
- <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
- <td width="100%" align="left" class="shortcuts"></td>
- <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
- <td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
- <td><a accesskey="p" href="re71.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
- <td><a accesskey="n" href="re73.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
- </tr></table>
- <div class="refentry">
- <a name="id-1.1.73"></a><div class="titlepage"></div>
- <div class="refnamediv">
- <h2><%GLibTraverseType></h2>
- <p><%GLibTraverseType></p>
- </div>
- <div class="refsect1">
- <a name="id-1.1.73.2"></a><h2>Description</h2>
- <p>Specifies the type of traversal performed by <code class="function">g_tree_traverse()</code>,
- <code class="function">g_node_traverse()</code> and <code class="function">g_node_find()</code>. The different orders are
- illustrated here:
- - In order: A, B, C, D, E, F, G, H, I
- ![](Sorted_binary_tree_inorder.svg)
- - Pre order: F, B, A, D, C, E, G, I, H
- ![](Sorted_binary_tree_preorder.svg)
- - Post order: A, C, E, D, B, H, I, G, F
- ![](Sorted_binary_tree_postorder.svg)
- - Level order: F, B, G, A, D, I, C, E, H
- ![](Sorted_binary_tree_breadth-first_traversal.svg)</p>
- </div>
- <div class="refsect1">
- <a name="id-1.1.73.3"></a><h2>Members</h2>
- <div class="refsect2">
- <a name="id-1.1.73.3.2"></a><h3>in-order</h3>
- <p class="remark"><em><span class="remark">alias <code class="code">G_IN_ORDER</code></span></em></p>
- <p>vists a node's left child first, then the node itself,
- then its right child. This is the one to use if you
- want the output sorted according to the compare
- function.</p>
- </div>
- <div class="refsect2">
- <a name="id-1.1.73.3.3"></a><h3>pre-order</h3>
- <p class="remark"><em><span class="remark">alias <code class="code">G_PRE_ORDER</code></span></em></p>
- <p>visits a node, then its children.</p>
- </div>
- <div class="refsect2">
- <a name="id-1.1.73.3.4"></a><h3>post-order</h3>
- <p class="remark"><em><span class="remark">alias <code class="code">G_POST_ORDER</code></span></em></p>
- <p>visits the node's children, then the node itself.</p>
- </div>
- <div class="refsect2">
- <a name="id-1.1.73.3.5"></a><h3>level-order</h3>
- <p class="remark"><em><span class="remark">alias <code class="code">G_LEVEL_ORDER</code></span></em></p>
- <p>is not implemented for
- [balanced binary trees][glib-Balanced-Binary-Trees].
- For [n-ary trees][glib-N-ary-Trees], it
- vists the root node first, then its children, then
- its grandchildren, and so on. Note that this is less
- efficient than the other orders.</p>
- </div>
- </div>
- </div>
- <div class="footer">
- <hr>Generated by GTK-Doc V1.33.1</div>
- </body>
- </html>
|