Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All simple paths (refresh #20) #353

Merged
merged 16 commits into from
Apr 5, 2024
Prev Previous commit
Next Next commit
Update src/traversals/all_simple_paths.jl
Co-authored-by: Guillaume Dalle <22795598+gdalle@users.noreply.github.com>
thchr and gdalle authored Apr 5, 2024
commit 17194551eff32998fd3e44669bec7b6eff30a959
2 changes: 1 addition & 1 deletion src/traversals/all_simple_paths.jl
Original file line number Diff line number Diff line change
@@ -117,7 +117,7 @@ function Base.iterate(

child = children[next_child_index]
next_child_index′ = pop!(state.stack)[2] # move child index forward
push!(state.stack, (parent_node, next_child_index′ + 1)) # ↩
push!(state.stack, (parent_node, next_child_index′ + one(T))) # ↩
child in state.visited && continue

if length(state.visited) == spi.cutoff