ParentEdgeStyleFunction

ParentEdgeStyleFunction

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

更多信息

  • ParentEdgeStyleFunction allows specifying the function to generate the style of the parent edge of the root node of a tree, as well as that of any subtrees at positions matching a pattern.
  • 可使用以下选项设置:
  • Automaticuse the automatic style
    funca general edge style function »
    Allfuncuse style 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 »
  • 实际上按 ParentEdgeStyleParentEdgeStyleFunctionParentEdgeShapeFunction 的顺序应用边样式指定,后来的指定将覆盖前面的指定.
  • ParentEdgeStyleFunctionfunc 指定根节点的父边的样式应由 func[data] 提供,其中 data 是根中的数据.

范例

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

基本范例  (4)

设置一条边的样式:

指定一组边的样式函数:

所有的边都使用同样的样式函数:

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

范围  (2)

用位置模式指定位置:

用数据模式指定位置:

属性和关系  (4)

可通过位置指定边的样式:

子树指定的样式优先于其祖先指定的样式:

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

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

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

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

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

文本

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2025_parentedgestylefunction, organization={Wolfram Research}, title={ParentEdgeStyleFunction}, year={2022}, url={https://reference.wolfram.com/language/ref/ParentEdgeStyleFunction.html}, note=[Accessed: 13-March-2025 ]}