TreeLeafCount

TreeLeafCount[tree]

tree の葉の数を与える.

詳細

例題

すべて開くすべて閉じる

  (1)

木の葉の数を数える:

アプリケーション  (1)

n 個のノードを持ち平均で n/2枚の葉がある木をランダムに生成する:

特性と関係  (8)

TreeLeafCount[tree]Length[TreeSelect[tree,TreeLeafQ]]に等しい:

TreeLeafCount[tree]Length[TreeLeaves[tree]]に等しい:

TreeLeafCount[tree]TreeCount[tree,_,{-1}]に等しい:

TreeLeafCount[Tree[{tree1,tree2,}]]TreeLeafCount[tree1]+TreeLeafCount[tree2]+を与える:

TreeLeafCount[Tree[data,None]]1を与える:

TreeLeafCount[Tree[data,{}]]0を与える:

TreeSize[Tree[data,{}]]1を与える.

TreeLeafCountTreeFoldを使って計算できる:

LeafCount[expr]は,一般に,TreeLeafCount[ExpressionTree[expr,HeadsTrue]]に等しい:

LeafCount[expr,HeadsFalse]は,一般に,TreeLeafCount[ExpressionTree[expr,"Subexpressions"]]に等しい:

Wolfram Research (2022), TreeLeafCount, Wolfram言語関数, https://reference.wolfram.com/language/ref/TreeLeafCount.html.

テキスト

Wolfram Research (2022), TreeLeafCount, Wolfram言語関数, https://reference.wolfram.com/language/ref/TreeLeafCount.html.

CMS

Wolfram Language. 2022. "TreeLeafCount." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TreeLeafCount.html.

APA

Wolfram Language. (2022). TreeLeafCount. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TreeLeafCount.html

BibTeX

@misc{reference.wolfram_2024_treeleafcount, author="Wolfram Research", title="{TreeLeafCount}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/TreeLeafCount.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_treeleafcount, organization={Wolfram Research}, title={TreeLeafCount}, year={2022}, url={https://reference.wolfram.com/language/ref/TreeLeafCount.html}, note=[Accessed: 22-November-2024 ]}