V2EX  ›  英汉词典

Balance Factor

释义 Definition

平衡因子:在数据结构(尤其是 AVL 平衡二叉搜索树)中,某个节点的平衡因子通常定义为左子树高度与右子树高度之差(常见约定为 *height(left) − height(right)*)。用来判断该节点是否“平衡”,并决定是否需要旋转调整。一般要求平衡因子在 -1、0、1 范围内(AVL 树)。

发音 Pronunciation

/ˈbæləns ˈfæktər/

例句 Examples

The balance factor of this node is 0.
这个节点的平衡因子是 0。

If the balance factor becomes 2 or −2 after insertion, the AVL tree must perform rotations to restore balance.
如果插入后平衡因子变成 2 或 −2,AVL 树就必须通过旋转来恢复平衡。

词源 Etymology

balance”源自拉丁语 bilanx(意为“有两只秤盘的天平”,引申为“平衡”);“factor”源自拉丁语 factor(意为“做事者/制作者”,后来发展为“因素、因子”)。合起来的 balance factor 字面意思就是“用来衡量平衡程度的因子”,在计算机科学中被专门用作树结构的平衡度指标。

相关词 Related Words

文学作品/名著用例 Literary Works

  • The Art of Computer Programming, Volume 3: Sorting and Searching(Donald E. Knuth):讨论平衡搜索树相关内容时涉及 AVL 树的平衡度概念。
  • Fundamentals of Data Structures in C(Ellis Horowitz 等):在 AVL 树章节中常用“balance factor”描述节点平衡情况。
  • Data Structures and Algorithm Analysis(Mark Allen Weiss):讲解 AVL 树维护平衡时,使用平衡因子来判断旋转类型。
  • Algorithms(Robert Sedgewick, Kevin Wayne):在平衡树/自平衡结构的讲解中,会出现与“balance factor”同类的平衡度量术语与用法。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1979 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 10:34 · PVG 18:34 · LAX 02:34 · JFK 05:34
♥ Do have faith in what you're doing.