Skip to content

Commit b21e444

Browse files
committed
some naming changes
1 parent 2910782 commit b21e444

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/iteration.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ end
366366

367367
Base.iterate(ti::StatelessBFS) = (ti.root, [])
368368

369-
function _level(inds, next_node, lvl)
370-
while length(inds) lvl
369+
function _descend_left(inds, next_node, level)
370+
while length(inds) level
371371
ch = children(next_node)
372372
isempty(ch) && break
373373
push!(inds, 1)
@@ -376,7 +376,7 @@ function _level(inds, next_node, lvl)
376376
inds
377377
end
378378

379-
function _nextind_or_deadend(node, ind, lvl)
379+
function _nextind_or_deadend(node, ind, level)
380380
current_lvl = active_lvl = length(ind)
381381
active_inds = copy(ind)
382382
# go up until there is a sibling to the right
@@ -390,7 +390,7 @@ function _nextind_or_deadend(node, ind, lvl)
390390
if !isnothing(iterate(ch, ni))
391391
newinds = [active_inds; ni]
392392
next_node = ch[ni]
393-
return _level(newinds, next_node, lvl)
393+
return _descend_left(newinds, next_node, level)
394394
end
395395
end
396396
nothing
@@ -404,7 +404,7 @@ function Base.iterate(ti::StatelessBFS, ind)
404404
if isnothing(newinds)
405405
active_lvl += 1
406406
active_lvl > org_lvl + 1 && return nothing
407-
newinds = _level([], ti.root, active_lvl)
407+
newinds = _descend_left([], ti.root, active_lvl)
408408
end
409409
length(newinds) == active_lvl && break
410410
end

0 commit comments

Comments
 (0)