Potential Issues with traversal infra, counters
khosravipasha opened this issue · 1 comments
khosravipasha commented
foreach_down
had some unexpected behaviourreset_counter
might not work in all cases
And overall want a more reliable way of reseting the travesals without having to reload the circuit again.
guyvdbroeck commented
I added reset_counter_hard
in fbdedf2
It resets the counter even if the nodes' fields are messed up (but is slower than the default implementation).
julia> circuit = load_smooth_logic_circuit(zoo_psdd_file("plants.psdd"));
julia> @btime (reset_counter(circuit,1);reset_counter(circuit,0))
46.723 ms (0 allocations: 0 bytes)
julia> @btime (reset_counter_hard(circuit,1);reset_counter_hard(circuit,0))
73.743 ms (540960 allocations: 14.26 MiB)
I believe this closes the issue?