...
首页> 外文期刊>Software >Untangling the balancing and searching of balanced binary search trees
【24h】

Untangling the balancing and searching of balanced binary search trees

机译:解开平衡二叉搜索树的平衡和搜索

获取原文
获取原文并翻译 | 示例

摘要

A balanced binary search tree can be characterized by two orthogonal issues: its search strategy and its balancing strategy. In this paper, we show how to decouple search and balancing strategies so that they can be expressed independently of each other, communicating only by basic operations such as rotations. Different balancing strategies, such as red-black trees and splay trees, and different search applications, such as key search and rank search, can be combined arbitrarily. As a new result, we show how optimal string search can be expressed as a search application on any balanced binary tree. We implement our framework in C++, with the heavy use of templates and inlining. It keeps balancing and searching separate, while still delivering a performance that compares favorably to widely used binary tree implementations. Common services, such as correctness checks and timing measurements, do not have to be rewritten for each tree implementation. The common framework simplifies experimentation with trees and search algorithms; as a demonstration, we present some simple comparisons of red-black trees, splay trees and treaps.
机译:平衡的二叉搜索树可以通过两个正交问题来表征:其搜索策略和平衡策略。在本文中,我们展示了如何使搜索和平衡策略脱钩,以便它们可以彼此独立地表达,仅通过诸如旋转之类的基本操作进行通信。可以任意组合不同的平衡策略(例如红黑树和八叉树)以及不同的搜索应用程序(例如关键搜索和等级搜索)。作为一个新的结果,我们展示了如何在任何平衡的二叉树上将最佳字符串搜索表示为搜索应用程序。我们大量使用模板和内联以C ++实现我们的框架。它保持平衡和独立搜索,同时仍提供与广泛使用的二叉树实现相比可观的性能。通用服务,例如正确性检查和时序测量,不必为每个树实现重写。通用框架简化了使用树和搜索算法的实验;作为演示,我们将对红黑树,八字树和挖土进行一些简单的比较。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号