Merger Tree Walkers¶
Class providing walkers for merger trees—iterator objects that traverse the nodes of a merger tree in a defined order. A walker maintains a current node pointer and advances it to the next node in the traversal sequence. Different implementations visit different subsets of nodes (all nodes, isolated halos only, branch-by-branch, construction-order) and are used by the evolver, outputter, and operator classes to apply operations over the correct set of nodes.
Default implementation: mergerTreeWalkerIsolatedNodes
Methods¶
next→logicalUpdate the pointer to the next node to visit. Returns true if such a node exists, returns false if no such node exists (i.e. if all nodes have been visited already).
type(treeNode) node[inout]
nodesRemain→logicalReturns true if more nodes remain to be walked to in the tree.
mergerTreeWalkerAllAndFormationNodes¶
Provides a merger tree walker which iterates depth-first over all nodes including formation nodes.
mergerTreeWalkerAllNodes¶
Provides a merger tree walker which iterates depth-first over all all nodes.
Methods
previousStep back to the previously visited node (if possible).
type(treeNode) node[inout]
setNodeSet the walker to the given node.
type(treeNode) node[in]
descendDescend through the hierarchy to the deepest node along the current branch.
mergerTreeWalkerAllNodesBranch¶
Provides a merger tree walker which iterates depth-first over all all nodes in a given branch.
Methods
descendDescend through the hierarchy to the deepest node along the current branch.
mergerTreeWalkerIsolatedNodes¶
Provides a merger tree walker which iterates depth-first over all isolated nodes.
(Default implementation)
mergerTreeWalkerIsolatedNodesBranch¶
Provides a merger tree walker which iterates depth-first over all isolated nodes in a given branch.
mergerTreeWalkerTreeConstruction¶
Provides a merger tree walker for trees under construction.
Methods
setNodeSet the walker to the given node.
type(treeNode) node[in]