-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hi,
while trying to understand active_arraylist I stumbled upon the fact that the pruning loop only removes every second element when multiple consecutive elements should be pruned. Currently the implementation is
iter = active_arrlist_endidx;
while active_arrlist(iter) > 1
lb = active_arrlist(iter);
if F(lb-1) + state_cell{lb, 1} > F(rb)
active_arrlist(iter) = active_arrlist(lb);
end
iter = lb;
end
while it should be
iter = active_arrlist_endidx;
while active_arrlist(iter) > 1
lb = active_arrlist(iter);
if F(lb-1) + state_cell{lb, 1} > F(rb)
active_arrlist(iter) = active_arrlist(lb);
else
iter = lb;
end
end
Not sure if it changes the result of the calculation, but at least it wastes cycles.
What do you think?
Metadata
Metadata
Assignees
Labels
No labels