clean up createGraph function

This commit is contained in:
Jonas Seiler 2023-06-16 10:50:56 +02:00
parent 7fd1d68148
commit 78c5cd5639

View File

@ -20,11 +20,11 @@ end
function createGraph(words::Vector{String})
graph = Vector{node}()
for w in words
_, me = binarySearch(w, words)
_, myself = binarySearch(w, words)
neighbours = Vector{Int}()
for x in HammingNeighbours(w)
for x in LevenshteinNeighbours(w)
exists, index = binarySearch(x, words)
if exists && index != me
if exists && index != myself
push!(neighbours, index)
end
end