Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dummy hash functions for arb types #1954

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/arb/Complex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,11 @@
return Bool(r)
end

function Base.hash(x::ComplexFieldElem, h::UInt)

Check warning on line 321 in src/arb/Complex.jl

View check run for this annotation

Codecov / codecov/patch

src/arb/Complex.jl#L321

Added line #L321 was not covered by tests
# TODO: improve me
return h

Check warning on line 323 in src/arb/Complex.jl

View check run for this annotation

Codecov / codecov/patch

src/arb/Complex.jl#L323

Added line #L323 was not covered by tests
end

function ==(x::ComplexFieldElem, y::ComplexFieldElem)
r = @ccall libflint.acb_eq(x::Ref{ComplexFieldElem}, y::Ref{ComplexFieldElem})::Cint
return Bool(r)
Expand Down
5 changes: 5 additions & 0 deletions src/arb/Real.jl
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@
return Bool(r)
end

function Base.hash(x::RealFieldElem, h::UInt)

Check warning on line 339 in src/arb/Real.jl

View check run for this annotation

Codecov / codecov/patch

src/arb/Real.jl#L339

Added line #L339 was not covered by tests
# TODO: improve me
return h

Check warning on line 341 in src/arb/Real.jl

View check run for this annotation

Codecov / codecov/patch

src/arb/Real.jl#L341

Added line #L341 was not covered by tests
end

function ==(x::RealFieldElem, y::RealFieldElem)
return Bool(@ccall libflint.arb_eq(x::Ref{RealFieldElem}, y::Ref{RealFieldElem})::Cint)
end
Expand Down
5 changes: 5 additions & 0 deletions src/arb/acb.jl
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@
return Bool(r)
end

function Base.hash(x::AcbFieldElem, h::UInt)

Check warning on line 332 in src/arb/acb.jl

View check run for this annotation

Codecov / codecov/patch

src/arb/acb.jl#L332

Added line #L332 was not covered by tests
# TODO: improve me
return h

Check warning on line 334 in src/arb/acb.jl

View check run for this annotation

Codecov / codecov/patch

src/arb/acb.jl#L334

Added line #L334 was not covered by tests
end

function ==(x::AcbFieldElem, y::AcbFieldElem)
r = @ccall libflint.acb_eq(x::Ref{AcbFieldElem}, y::Ref{AcbFieldElem})::Cint
return Bool(r)
Expand Down
5 changes: 5 additions & 0 deletions src/arb/arb.jl
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,11 @@
return Bool(r)
end

function Base.hash(x::ArbFieldElem, h::UInt)

Check warning on line 355 in src/arb/arb.jl

View check run for this annotation

Codecov / codecov/patch

src/arb/arb.jl#L355

Added line #L355 was not covered by tests
# TODO: improve me
return h

Check warning on line 357 in src/arb/arb.jl

View check run for this annotation

Codecov / codecov/patch

src/arb/arb.jl#L357

Added line #L357 was not covered by tests
end

function ==(x::ArbFieldElem, y::ArbFieldElem)
return Bool(@ccall libflint.arb_eq(x::Ref{ArbFieldElem}, y::Ref{ArbFieldElem})::Cint)
end
Expand Down
Loading