您现在的位置:计算机技术学习网 > 技术中心 > 编程开发 > C >

Glib实例学习(5)平衡二叉树

来源:一方有 责任编辑:栏目编辑 发表时间:2013-07-01 18:15 点击:

转载自:http://blog.chinaunix.net/space.php?uid=25696269&do=blog&id=1595853

1:概述
   平衡二叉树:对有序序列的一种优化,可以用来高效的查找和遍历等的一种树形结构。

2:原型

 

  1. GTree* g_tree_new (GCompareFunc key_compare_func);  
  2. GTree* g_tree_new_with_data (GCompareDataFunc key_compare_func,  
  3.                                                          gpointer key_compare_data);  
  4. GTree* g_tree_new_full (GCompareDataFunc key_compare_func,  
  5.                                                          gpointer key_compare_data,  
  6.                                                          GDestroyNotify key_destroy_func,  
  7.                                                          GDestroyNotify value_destroy_func);  
  8. void g_tree_insert (GTree *tree,  
  9.                                                          gpointer key,  
  10.                                                          gpointer value);  
  11. void g_tree_replace (GTree *tree,  
  12.                               &

    相关新闻>>

      发表评论
      请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
      用户名: 验证码:点击我更换图片
      最新评论 更多>>
      网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
      Copyright © 2008-2015 计算机技术学习交流网. 版权所有

      豫ICP备11007008号-1