ParentEdgeStyleFunction

ParentEdgeStyleFunction

Treeおよび関連関数のオプションで,辺のスタイルを生成する関数を指定する.

詳細

  • ParentEdgeStyleFunctionを使うと木の根のノードの親の辺のスタイルおよびパターンにマッチする位置にある任意の部分木のスタイルを生成する関数が指定できる.
  • 次は,使用可能なオプション設定である.
  • Automatic自動スタイルを使う
    func一般的な辺スタイル関数 »
    Allfuncすべての辺にスタイル関数 func を使う »
    TreeCases[pattern]funcpattern にマッチするデータのノードの辺に func を使う  »
    "Leaves"func葉の辺に func を使う »
    "NonLeaves"func葉以外の辺に func を使う »
    {pos1func1,pos2func2,}funciを相対位置 posiの辺に使う »
    {patt1func1,patt2func2,}pattiにマッチする位置の辺に funciを使う »
  • 辺のスタイル指定は,事実上,ParentEdgeStyleParentEdgeStyleFunctionParentEdgeShapeFunctionの順に適用され,後の指定が先の指定をオーバーライドする.
  • ParentEdgeStyleFunctionfunc は根ノードの親の辺のスタイルを func[data]が与えるものにするように指定する.ここで,data は根のデータである.

例題

すべて開くすべて閉じる

  (4)

個々の辺にスタイル付けする:

辺スタイル関数のリストを指定する:

すべての辺に同じスタイル関数を使う:

葉と葉以外の辺にスタイル関数を指定する:

スコープ  (2)

位置パターンで位置を指定する:

データパターンで位置を指定する:

特性と関係  (4)

辺のスタイルは位置で指定できる:

部分木によって指定されたスタイルはその祖先によって指定されたスタイルよりも優先順位が高い:

部分木内の位置{i,j,}は相対位置{i,j,}にあるその部分木を参照する:

位置{1}における相対位置{2}は大域的な位置{1,2}を参照する:

一般に,パターン pattpatt にマッチする大域的な位置{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 Language. 2022. "ParentEdgeStyleFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ParentEdgeStyleFunction.html.

APA

Wolfram Language. (2022). ParentEdgeStyleFunction. Wolfram Language & System Documentation Center. Retrieved from 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 ]}