Module trees::potted[][src]

Tree/Forest for trees built top down.

Some interesting features of the potted trees are:

  1. They can be written in the form of Rust tuple. Only the tuples composed of no more than a limited fields (now 32) are supported due to the lack of variadic generics in current Rust. And the library user is required to impl the mark trait TreeData for the type other than primitives or strings to be the data type of the tree.

  2. The child nodes can be randomly accessed in constant time, as long as the tree/forest is constructed in batch mode, and do few modifications after that.

  3. The underlying storage is a Vec, which minimize the dynamic memory allocations.

Re-exports

pub use self::tree::Tree;
pub use self::forest::Forest;
pub use self::node::Node;
pub use self::node::MovedNodes;
pub use self::node::NullIndex;
pub use self::pot::Pot;
pub use self::iter::Iter;
pub use self::iter::IterMut;
pub use self::notation::TreeData;
pub use self::notation::TupleTree;
pub use self::notation::TupleForest;
pub use self::notation::fr;
pub use super::bfs;
pub use super::Size;

Modules

forest

Forest composed of disjoint Trees.

iter
node

Tree node implementation.

notation
pot
tree

Tree composed of hierarchical Nodes.