diff --git a/src/lib/iter-tree-explorer.hpp b/src/lib/iter-tree-explorer.hpp
index e79ebc928..e946cf7d9 100644
--- a/src/lib/iter-tree-explorer.hpp
+++ b/src/lib/iter-tree-explorer.hpp
@@ -1135,6 +1135,21 @@ namespace lib {
}
+ /** extension functionality to be used on top of expand(), to perform expansion on next iteration.
+ * When configured, an expandChildren() call will not happen immediately, but rather in place of
+ * the next iteration step. Basically child expansion _is kind of a special iteration step,_ and
+ * thus all we need to do is add another layer with a boolean state flag, which catches the
+ * expandChildren() and iterNext() calls and redirects appropriately.
+ * @warning expandAll and expandOnIteration are not meant to be used at the same time.
+ */
+ auto
+ expandOnIteration()
+ {
+ UNIMPLEMENTED ("expansion scheduler flag");
+ return *this;
+ }
+
+
/** adapt this TreeExplorer to pipe each result value through a transformation function.
* Several "layers" of mapping can be piled on top of each other, possibly mixed with the
* other types of adaptation, like the child-expanding operation, or a filter. Obviously,
diff --git a/tests/library/iter-tree-explorer-test.cpp b/tests/library/iter-tree-explorer-test.cpp
index 8875adc31..5aa9eabcf 100644
--- a/tests/library/iter-tree-explorer-test.cpp
+++ b/tests/library/iter-tree-explorer-test.cpp
@@ -270,6 +270,7 @@ namespace test{
verify_expandOperation();
verify_transformOperation();
verify_combinedExpandTransform();
+ verify_scheduledExpansion();
verify_FilterIterator();
verify_asIterSource();
verify_IterSource();
@@ -669,6 +670,23 @@ namespace test{
+ /** @test child expansion can be scheduled to happen on next iteration.
+ * As such, _"child expansion"_ happens right away, thereby consuming a node
+ * and replacing it with its child sequence. Sometimes, when building search and matching
+ * algorithms, we rather just want to _plan_ a child expansion to happen on next increment.
+ * Such is especially relevant when searching for a locally or global maximal solution, which
+ * is rather simple to implement with an additional filtering layer -- and this approach requires
+ * us to deliver all partial solutions for the filter layer to act on. Obviously this functionality
+ * leads to additional state and thus is provided as optional layer in the TreeExplorer builder.
+ */
+ void
+ verify_scheduledExpansion()
+ {
+ UNIMPLEMENTED ("schedule child expansion to be performed on next iteration");
+ }
+
+
+
/** @test add a filtering predicate into the pipeline.
* As in all the previously demonstrated cases, also the _filtering_ is added as decorator,
* wrapping the source and all previously attached decoration layers. And in a similar way,
diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm
index aea52fd93..2efb7e6a2 100644
--- a/wiki/thinkPad.ichthyo.mm
+++ b/wiki/thinkPad.ichthyo.mm
@@ -977,7 +977,7 @@
-
+
@@ -4096,7 +4096,7 @@
-
+
@@ -4244,11 +4244,18 @@
-
+
+
+
-
+
+
+
+
+
+
@@ -4311,10 +4318,54 @@