ParentEdgeLabelFunction

ParentEdgeLabelFunction

is an option for Tree and related functions that specifies functions to use to generate edge labels.

更多信息

  • ParentEdgeLabelFunction 允许指定生成树的根节点的父边标签的函数,以及生成与模式匹配的位置上任何子树的边标签的函数.
  • 可使用以下选项设置:
  • Automaticuse the keys of any associations as the labels
    Noneuse no label
    funca general edge label function »
    Allfuncuse label function func for all edges »
    TreeCases[pattern]funcuse func for edges at nodes with data matching pattern »
    "Leaves"funcuse func for edges at leaves »
    "NonLeaves"funcuse func for edges at non-leaves »
    {pos1func1,pos2func2,}use funci for the edge at relative position posi »
    {patt1func1,patt2func2,}use funci for edges at positions matching patti »
  • 实际上按 ParentEdgeLabelParentEdgeLabelFunctionParentEdgeLabelStyle 的顺序应用边标签指定,后来的指定将覆盖前面的指定.
  • ParentEdgeLabelFunctionfunc 指定根节点的父边的标签应由 func[data] 提供,其中 data 是根中的数据.

范例

打开所有单元关闭所有单元

基本范例  (4)

标注一条边:

Specify a list of edge label functions:

Use no edge labels:

Specify label functions for the leaf and non-leaf edges:

范围  (2)

用位置模式指定位置:

用数据模式指定位置:

属性和关系  (5)

Edges are automatically labeled with the keys of any associations of children:

No labels are used for lists of children:

可按位置指定边的标签:

子树指定的标签优先于其祖先指定的标签:

子树内的位置 {i,j,} 指代的是相对位置 {i,j,} 处的子树:

{1} 处的相对位置 {2} 指代的是全局位置 {1,2}

通常情况下,模式 patt 应用于与 patt 匹配的全局位置 {i,j,} 处的子树:

模式列表 {patt1,patt2,} 应用于与 patti 匹配的相对位置 {i,j,}

Wolfram Research (2022),ParentEdgeLabelFunction,Wolfram 语言函数,https://reference.wolfram.com/language/ref/ParentEdgeLabelFunction.html.

文本

Wolfram Research (2022),ParentEdgeLabelFunction,Wolfram 语言函数,https://reference.wolfram.com/language/ref/ParentEdgeLabelFunction.html.

CMS

Wolfram 语言. 2022. "ParentEdgeLabelFunction." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/ParentEdgeLabelFunction.html.

APA

Wolfram 语言. (2022). ParentEdgeLabelFunction. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/ParentEdgeLabelFunction.html 年

BibTeX

@misc{reference.wolfram_2025_parentedgelabelfunction, author="Wolfram Research", title="{ParentEdgeLabelFunction}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/ParentEdgeLabelFunction.html}", note=[Accessed: 24-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_parentedgelabelfunction, organization={Wolfram Research}, title={ParentEdgeLabelFunction}, year={2022}, url={https://reference.wolfram.com/language/ref/ParentEdgeLabelFunction.html}, note=[Accessed: 24-April-2025 ]}