基本树概念:定义祖先 [英] Basic Tree Concept: Defining ancestors

查看:685
本文介绍了基本树概念:定义祖先的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

定义了什么祖先?更具体地说,E是H的祖先吗?或者更简单地说,F,C,A是H的祖先?也许甚至G?我只想弄清楚这个简单的概念。

What defines an ancestor? More specifically, would E be an ancestor to H? Or is it more simply that F,C,A are ancestors to H? Maybe even G? I would just like to clear up this simple concept.

推荐答案

E不是H的祖先。这是叔叔,因为它是F的兄弟姐妹,是H的父母

E is not an ancestor of H. It's an uncle because it's a sibling of F, which is the parent of H.

F,C ,A是H的祖先。

F,C,A are ancestors of H. That's true.

G与H根本无关。

树结构关系符号可以在此处找到(根据维基百科)

Tree structure relationship notation can be found here (according to Wikipedia)



  • 节点的父节点是层次结构中较高一级的节点(即,更靠近根节点),并且位于同一分支上。

  • 同级(兄弟或姐妹)节点共享相同的父节点。

  • 节点的叔叔是该节点的父节点的同胞。

  • 连接到所有下级节点的节点级别的节点称为祖先。相连的下级节点是
    祖先节点的后代。

  • A node's "parent" is a node one step higher in the hierarchy (i.e. closer to the root node) and lying on the same branch.
  • "Sibling" ("brother" or "sister") nodes share the same parent node.
  • A node's "uncles" are siblings of that node's parent.
  • A node that is connected to all lower-level nodes is called an "ancestor". The connected lower-level nodes are "descendants" of the ancestor node.

这篇关于基本树概念:定义祖先的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆