Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Finish post-order travesal with WakeupTreeIterator
authorMaxwell Pirtle <maxwellpirtle@gmail.com>
Wed, 10 May 2023 13:03:08 +0000 (15:03 +0200)
committerMaxwell Pirtle <maxwellpirtle@gmail.com>
Tue, 16 May 2023 07:50:34 +0000 (09:50 +0200)
commit19ac7578ffba786dbf458aa6afc8822ea73f78b6
treef0dc060466caaeb1a194a1788f116b21a6bd7f22
parent03b61d41e9281c5d7a68ebc72c326d33f1f3bc1a
Finish post-order travesal with WakeupTreeIterator

The WakeupTreeIterator is now full implemented:
we now properly add nodes to the top of the
stack in reverse order, resulting in a post-order
traversal as desired.

One subtlety arose with the implementation: the
root node is not contained in the list of any
other node in the tree. To handle this issue,
a "fake" list managed by the iterator was added
into which the root is placed at construction-time.
This prevents us from needing to change any of the
logic, and we can simply treat the root as any other
node in the traversal
src/mc/explo/odpor/WakeupTree.hpp
src/mc/explo/odpor/WakeupTreeIterator.cpp
src/mc/explo/odpor/WakeupTreeIterator.hpp