View source: R/derivationTrees.R
treeNodes | R Documentation |
treeNodes()
returns
the number of non-terminal symbols in a
derivation tree.
treeNodes(tree, ST)
tree |
Derivation tree. |
ST |
Symbol table. |
Integer. Number of non-terminal symbols in a derivation tree.
Other Measures of Tree Attributes:
treeLeaves()
,
treeListDepth()
,
treeProbability()
,
treeSize()
g<-compileBNF(booleanGrammar())
a<-randomDerivationTree(g$Start, g)
treeNodes(a, g$ST)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.