Skip to content

Commit

Permalink
Merge pull request #157 from kalmarek/patch-1
Browse files Browse the repository at this point in the history
fix hash function
  • Loading branch information
wbhart authored Apr 11, 2017
2 parents 19ed168 + fa97da1 commit 52b4c59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/flint/perm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ end

function Base.hash(a::perm, h::UInt)
b = 0x595dee0e71d271d0%UInt
for i in 1:a.d
b $= hash(a[i - 1], h) $ h
for i in 1:length(a.d)
b $= hash(a[i], h) $ h
b = (b << 1) | (b >> (sizeof(Int)*8 - 1))
end
return b
Expand Down

0 comments on commit 52b4c59

Please sign in to comment.