Closed khosravipasha closed 3 years ago
I added reset_counter_hard
in https://github.com/Juice-jl/LogicCircuits.jl/commit/fbdedf2157e58fd606155cac5b7aa8746a920f71
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?
foreach_down
had some unexpected behaviourreset_counter
might not work in all casesAnd overall want a more reliable way of reseting the travesals without having to reload the circuit again.