TreeQ

TreeQ[tree]

yields True if tree is a valid Tree object and False otherwise.

Examples

open allclose all

Basic Examples  (1)

Test whether an expression is a tree:

Scope  (3)

Check whether this is a valid Tree object:

This is an invalid Tree object:

This is a valid Tree object containing a child whose data is an expression with head Tree:

Properties & Relations  (1)

Test whether an expression is a valid tree object:

It is not a valid tree graph expression:

Construct the corresponding Graph object:

Wolfram Research (2021), TreeQ, Wolfram Language function, https://reference.wolfram.com/language/ref/TreeQ.html.

Text

Wolfram Research (2021), TreeQ, Wolfram Language function, https://reference.wolfram.com/language/ref/TreeQ.html.

CMS

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

APA

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

BibTeX

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

BibLaTeX

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