I implemented an iterative algorithm where each iteration involves traversing a pre-order tree (sometimes called down accumulation), followed by a tree traversal after ordering (upward accumulation). Each visit to each node includes the calculation and storage of information that will be used for the next visit (either in a subsequent post-order or in a subsequent iteration).
During the pre-order crawl, each node can be processed independently if all nodes between it and the root have already been processed. After processing, each node must pass a tuple (in particular, two floats) to each of its children. When traversing after an order, each node can be processed independently if all its subtrees (if any) are already processed. After processing, each node must pass one float to its parent object.
The structure of the trees is static and unchanged during the algorithm. However, during a downward traversal, if two floats are transmitted, both become equal to zero, the entire subtree under this node does not need to be processed, and the initial traversal for this node can begin. (The subtree should be preserved, because past floats in subsequent iterations may become non-zero in this node, and the traversal will continue).
The computation intensity at each node is the same across the tree. The calculation in each node is trivial: just a few sums and multiplication / division by a list of numbers with a length equal to the number of children in the node.
: node 2 0-6 . , ( ). , : , , .
1000 ; "" , , ( ?). , 100 (, ), , . .
?