output::tree
-- display of
treesoutput::tree
formats internally represented trees to
display graphically.
output::tree(Tree <, indentdepth <, charlist> <,
options>>)
Tree |
- | the tree, given as a special list |
indentdepth |
- | indent depth for each subtree |
charlist |
- | the chars that illustrate the tree structure |
options |
- | option Small |
Small |
- | suppresses the display of a space line between every tree entry |
an string object to display
output::tree
displays trees given as specially
MuPAD lists.print
and fprint
and the option
Unquoted
the tree can be displayed.charlist
is a list with five characters.
The default value is [", "+", ", ``", " "]
. The characters
have the following meaning (described in the order of the list).output::tree
displayes special nested lists
as trees:
>> TREE := ["a1", "a2", ["b1", "b2", ["c1", "c2"], "b3"], ["d1", "d2", "d3"]]: print(Unquoted, output::tree(TREE))
a1 | +-- a2 | +-- b1 | | | +-- b2 | | | +-- c1 | | | | | `-- c2 | | | `-- b3 | `-- d1 | +-- d2 | `-- d3
>> print(Unquoted, output::tree(TREE, 3, Small)):
a1 +- a2 +- b1 | +- b2 | +- c1 | | `- c2 | `- b3 `- d1 +- d2 `- d3
The chars can be defined by the user:
>> print(Unquoted, output::tree(TREE, 6, ["|", "|", ".", "\\", " "])):
a1 | |.... a2 | |.... b1 | | | |.... b2 | | | |.... c1 | | | | | \.... c2 | | | \.... b3 | \.... d1 | |.... d2 | \.... d3