Skip to content

Commit

Permalink
fix bug of using combinations(::Set, n)
Browse files Browse the repository at this point in the history
  • Loading branch information
guo-yong-zhi authored Jan 19, 2021
1 parent f601894 commit 0d84e57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/qtreetools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ function listcollision_native(qtrees::AbstractVector, mask::AbstractStackedQtree
indpairs = combinations(inds, 2) |> collect |> shuffle!
listcollision_native(qtrees, mask, indpairs, collist=collist, at=at)
end
function listcollision_native(qtrees::AbstractVector, mask::AbstractStackedQtree,
inds::AbstractSet; kargs...)
listcollision_native(qtrees, mask, inds|>collect; kargs...)
end

function findroom(ground, q=[(levelnum(ground), 1, 1)])
if isempty(q)
Expand Down Expand Up @@ -366,4 +370,4 @@ function listcollision(qtrees::AbstractVector, mask::AbstractStackedQtree, args.
else
return listcollision_native(qtrees, mask, args...; kargs...)
end
end
end

0 comments on commit 0d84e57

Please sign in to comment.