Skip to content

Commit

Permalink
Add hash(::Union{ZZIdl, ZZFracIdl})
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed Nov 29, 2024
1 parent 65b40d3 commit 653c711
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/NumField/QQ.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,18 @@ function ==(I::ZZIdl, J::ZZIdl)
return I.gen == J.gen
end

function Base.hash(I::ZZIdl, h::UInt)
return hash(I.gen, h)
end

function ==(I::ZZFracIdl, J::ZZFracIdl)
return I.gen == J.gen
end

function Base.hash(I::ZZFracIdl, h::UInt)
return hash(I.gen, h)
end

# access
gen(I::ZZIdl) = I.gen

Expand Down

0 comments on commit 653c711

Please sign in to comment.