Random - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Iterator[Trees]

  

Random

  

generate a random tree

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Random(n,format=fmt)

Parameters

n

-

posint; number of internal nodes

format=fmt

-

format of the tree

Options

• 

format = A,C,D,E,LR,P,S,Z

  

Specifies the format of the tree. The default is LR. See Iterator[Trees] for a description of the formats.

Description

• 

The Random command generates a random tree in the selected format.

Examples

withIterator:-Trees

Conjugate,Convert,Random,Transpose

(1)

Generate a random tree with thirty internal nodes in C format.

Random30,format=C

012111111232333344555520122332

(2)

Compatibility

• 

The Iterator[Trees][Random] command was introduced in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

Iterator

Iterator[Trees]