compute Newick encoding
graph; tree or arborescence
(optional) one or more options as specified below
directed = truefalse
Specifies whether the output graph should be directed or undirected when the input is a Newick string. The default is true. When the input is not a string, this option is ignored.
root = string, name, or integer
Specifies a root vertex when the input is an undirected graph. The default value is the first vertex in the list returned by Vertices. When the input is not an undirected graph, this option is ignored.
Newick(G), where G is a graph, returns a string comprising the Newick encoding of G.
If G is undirected, it must be a tree.
If G is directed, it must be an arborescence or anti-arborescence.
Newick(s), where s a string, returns a graph whose Newick encoding is s.
Generate the Newick encoding of a tree.
T≔Graph 1: an undirected unweighted graph with 10 vertices and 9 edge(s)
Generate the Newick encoding of an arborescence.
A≔Graph 2: a directed unweighted graph with 10 vertices and 9 arc(s)
Generate the unweighted graph corresponding to a given Newick encoding.
Graph 3: a directed unweighted graph with 20 vertices and 19 arc(s)
Generate the weighted graph corresponding to a given Newick encoding.
Graph 4: a directed weighted graph with 10 vertices and 9 arc(s)
The GraphTheory[Newick] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
Download Help Document
What kind of issue would you like to report? (Optional)