Class: TreeGenerator

TreeGenerator(genParams)

A generator for random (but well-formed) CPEE process trees. The generation of trees is somewhat configurable through the use of parameters. Also offers functionality to change process trees in a configurable fashion.

Constructor

new TreeGenerator(genParams)

Construct a new TreeGenerator instance.
Parameters:
Name Type Description
genParams GeneratorParameters Parameters for the generation of random process trees.
Source:
See:

Classes

TreeGenerator

Methods

changeTree(tree, changeParams)

Apply edit operations to an existing tree. The distribution and amount of changes can be specified. Returns a diff test case containing the old and changed tree.
Parameters:
Name Type Description
tree Node The root node of the tree to be changed.
changeParams ChangeParameters A set of parameters for the changes.
Source:
Returns:

randomTree(root) → {Node}

Generate a random process tree using the specified parameters and random endpoints, labels, and variables. The resulting process tree should conform to the CPEE specification (syntactic correctness).
Parameters:
Name Type Description
root Node Specify an optional root node for the tree. By default, a new root is generated.
Source:
Returns:
The root node of the generated process tree
Type
Node