Module walk_tree

Source

Structsยง

WalkTree
ParallelIterator for arbitrary tree-shaped patterns. Returned by the walk_tree() function.
WalkTreePostfix
ParallelIterator for arbitrary tree-shaped patterns. Returned by the walk_tree_postfix() function.
WalkTreePostfixProducer ๐Ÿ”’
WalkTreePrefix
ParallelIterator for arbitrary tree-shaped patterns. Returned by the walk_tree_prefix() function.
WalkTreePrefixProducer ๐Ÿ”’

Functionsยง

consume_rec_postfix ๐Ÿ”’
split_vec ๐Ÿ”’
Divide given vector in two equally sized vectors. Return None if initial size is <=1. We return the first half and keep the last half in v.
walk_tree
Create a tree like parallel iterator from an initial root node. The children_of function should take a node and iterate on all of its child nodes. The best parallelization is obtained when the tree is balanced but we should also be able to handle harder cases.
walk_tree_postfix
Create a tree like postfix parallel iterator from an initial root node. The children_of function should take a node and iterate on all of its child nodes. The best parallelization is obtained when the tree is balanced but we should also be able to handle harder cases.
walk_tree_prefix
Create a tree-like prefix parallel iterator from an initial root node. The children_of function should take a node and return an iterator over its child nodes. The best parallelization is obtained when the tree is balanced but we should also be able to handle harder cases.