clean up createGraph function
This commit is contained in:
parent
7fd1d68148
commit
78c5cd5639
6
main.jl
6
main.jl
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user