Procs
func ascii[T](node: Node[T]; char1 = "-"; showInternal = true): string
- Returns ascii string representation of tree. Source Edit
func ascii[T](tree: Tree[T]; char1 = "-"; showInternal = true): string
- Returns ascii string representation of tree. Source Edit
func calcTreeLength[T](node: Node[T]; includeRoot = true): float
- Calculate total length of tree. Source Edit
func calcTreeLength[T](tree: Tree[T]): float
- Calculate total length of tree. Source Edit
func newNode(label: string; length: float; typ: typedesc = void): Node[typ]
- Create new Node. Source Edit
proc treeFromFile(path: string; typ: typedesc = void): Tree[typ]
- Read tree from file. Source Edit
proc treeFromString(str: string; typ: typedesc = void): Tree[typ]
- Read tree from string. Source Edit
func treeHeight[T](node: Node[T]; includeRoot = true): float
- Calculate the height of subtree. Source Edit
func treeHeight[T](tree: Tree[T]; includeRoot = true): float
- Calculate the height of tree. Source Edit
Iterators
iterator inorder[T](root: Node[T]): Node[T]
- Inorder traverse. Tree must be strictly bifurcating. Source Edit
iterator inorder[T](tree: Tree[T]): Node[T]
- Inorder traverse. Tree must be strictly bifurcating. Source Edit
iterator iterleaves[T](root: Node[T]): Node[T]
- Iter over leaves. Source Edit
iterator iterleaves[T](tree: Tree[T]): Node[T]
- Iter over leaves. Source Edit
iterator levelorder[T](root: Node[T]): Node[T]
- Levelorder traverse. Source Edit
iterator levelorder[T](tree: Tree[T]): Node[T]
- Levelorder traverse. Source Edit
iterator newickorder[T](root: Node[T]): tuple[node: Node[T], firstVisit: bool]
- Newick order traverse. All internal nodes are visited twice. Source Edit
iterator newickorder[T](tree: Tree[T]): tuple[node: Node[T], firstVisit: bool]
- Newick order traverse. All internal nodes are visited twice. Source Edit