We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
adjsort
1 parent d3503f0 commit 66d1ebfCopy full SHA for 66d1ebf
src/topologies/halfedge.jl
@@ -219,7 +219,7 @@ end
219
function adjsort(elems::AbstractVector{<:Connectivity})
220
# initialize list of adjacent elements
221
# with first element from original list
222
- list = map(indices, elems)
+ list::Vector{Tuple{Vararg{Int}}} = map(indices, elems)
223
adjs = similar(list, 0)
224
push!(adjs, popfirst!(list))
225
@@ -231,7 +231,7 @@ function adjsort(elems::AbstractVector{<:Connectivity})
231
# one vertex with the last adjacent element
232
found = false
233
vinds = last(adjs)
234
- for i::Int in vinds
+ for i in vinds
235
not_i = (filter(!=(i), vinds)...,)
236
for j in reverse(eachindex(list))
237
# equivalent to `length(vinds ∩ list[j]) > 1` but more efficient (no allocs(?))
0 commit comments