Problem
I wish to construct a network that performs iterations like “for loop.”
Solution
Use the Iterator subnetwork and Iterator node. For example, if you want a localization result generated by ConstantLocalization to DisplayLocalization 500 times, build a network similar to that in Fig. 7.1. Note that the Iterator node is at New Node $\rightarrow $ Flow $\rightarrow $ Iterator .
If you see the localization result for 500 frames, you have successfully built this sample network.
Discussion
Iterate node decrements the counter, whose initial value is given by the parameter MAX_ITER, for each iteration. If the counter is $\geq 0$ , it outputs true; otherwise, it outputs false. By setting this output as the CONDITION terminal, you can realize the “for loop.”
See Also
None.