You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one calls
t.conditioniterator(n, condition)
and node n does not satisfy the condition, it will still get added to the returned list of IDs, because of the following code:
function val = recurse(node)
val = node; % <--- first, node is added...
content = obj.Node{val};
if obj.isleaf(node) || ~condition(content) % ...THEN, the condition is checked
return
else
% bla
This only happens for the node passed as argument (the "root" of the traversal). For subsequent nodes visited in the function, they are checked before the recursive call. Which, incidentally, makes the above bolded check redundant.
So it seems the solution is to remove the redundant check.
The text was updated successfully, but these errors were encountered:
If one calls
t.conditioniterator(n, condition)
and node n does not satisfy the condition, it will still get added to the returned list of IDs, because of the following code:
This only happens for the node passed as argument (the "root" of the traversal). For subsequent nodes visited in the function, they are checked before the recursive call. Which, incidentally, makes the above bolded check redundant.
So it seems the solution is to remove the redundant check.
The text was updated successfully, but these errors were encountered: