treeListDepth {xegaDerivationTrees}R Documentation

Measures the depth of a (nested) list.

Description

treeListDepth() returns the depth of a nested list. For a derivation tree, this is approximately twice the derivation depth.

Usage

treeListDepth(t, tDepth = 0)

Arguments

t

List.

tDepth

Integer. List depth. Default: 0.

Value

Depth of a nested list.

See Also

Other Measures of Tree Attributes: treeLeaves(), treeNodes(), treeSize()

Examples

g<-compileBNF(booleanGrammar())
a<-randomDerivationTree(g$Start, g)
treeListDepth(a) 


[Package xegaDerivationTrees version 1.0.0.0 Index]