TreeSize

TreeSize[tree]

tree の部分木の数を与える.

詳細

  • 各ノードはもとの木の部分木の根なので,Treeオブジェクトの部分木の数はその木のノード数でもある.
  • TreeSize[tree]TreeCount[tree,_]に等しい.

例題

すべて開くすべて閉じる

  (1)

木の部分木の数を数える:

特性と関係  (4)

TreeSize[tree]TreeCount[tree,_]に等しい:

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

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

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

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

TreeSizeTreeFoldを使って計算できる:

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

テキスト

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_treesize, organization={Wolfram Research}, title={TreeSize}, year={2021}, url={https://reference.wolfram.com/language/ref/TreeSize.html}, note=[Accessed: 21-November-2024 ]}