randomExpressionChilds: Select random childs or subtrees of an expression

Description Usage Arguments

Description

randchild returns a uniformly random direct child of an expression. randsubtree returns a uniformly random subtree of an expression. Note that this subtree must not be a direct child.

Usage

1
2
3
randchild(expr)

randsubtree(expr, subtreeprob = 0.1)

Arguments

expr

The expression to select random childs or subtrees from.

subtreeprob

The probability for randsubtree to select a certain subtree instead of searching further via an recursive call.


rgp documentation built on May 30, 2017, 12:45 a.m.