Skip to content

Commit

Permalink
fix the bug in reading h5 instances
Browse files Browse the repository at this point in the history
  • Loading branch information
annamariadziubyna committed Nov 22, 2023
1 parent 2ab5ce1 commit a1aaf23
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,8 @@ function load_openGM(fname::String, Nx::Union{Integer, Nothing}=nothing, Ny::Uni
ny, nx = divrem(tt, Nx)
push!(n, ny, nx)
end

if length(n) == 4
if abs(n[1] - n[3]) + abs(n[2] - n[4]) [1,2] || (abs(n[1] - n[3]) + abs(n[2] - n[4]) == 2 && (abs(n[1] - n[3]) == 2 || abs(n[2] - n[4])))
if abs(n[1] - n[3]) + abs(n[2] - n[4]) [1,2] || (abs(n[1] - n[3]) + abs(n[2] - n[4]) == 2 && (abs(n[1] - n[3]) == 2 || abs(n[2] - n[4] == 2)))
throw(ErrorException("Not nearest neighbour or diagonal neighbors"))
end
end
Expand Down

0 comments on commit a1aaf23

Please sign in to comment.