[][src]Module compt::dfs_order

A complete binary tree stored in a Vec laid out in dfs in order. One advantage of using the dfs order over the bfs order, is that at any point during traversal of the tree, you can turn the visitor into a slice representing the rest of the nodes underneath that visitor.

Structs

CompleteTree

Complete binary tree stored in DFS inorder order. Height is atleast 1.

CompleteTreeContainer

Container for a dfs order tree. Internally uses a Vec. Derefs to a CompleteTree.

InOrder

Pass this to the tree for In order layout

NotCompleteTreeSizeErr

Error indicating the vec that was passed is not a size that you would expect for the given height.

PostOrder

Pass this to the tree for post order layout

PreOrder

Pass this to the tree for pre order layout

Vistr

Tree visitor that returns a reference to each element in the tree.

VistrMut

Tree visitor that returns a mutable reference to each element in the tree.