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

Implement isequal(...) and hash(....) #27

Closed
NicholasWMRitchie opened this issue Dec 16, 2019 · 2 comments
Closed

Implement isequal(...) and hash(....) #27

NicholasWMRitchie opened this issue Dec 16, 2019 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@NicholasWMRitchie
Copy link
Contributor

It would be very helpful to implement isequal and hash in a fast efficient manner since in many uses Element instances are used as keys.

For example:
Base.hash(elm::Element) = hash(elm.number)
Base.isequal(elm1::Element,elm2::Element) = elm1.number==elm2.number

and maybe also

Base.isless(elm1::Element, elm2::Element) = elm1.number < elm2.number

@stevengj stevengj added enhancement New feature or request good first issue Good for newcomers labels Dec 16, 2019
@stevengj
Copy link
Collaborator

A PR would be welcome.

@berquist
Copy link

berquist commented May 2, 2020

Can someone close this, since it was done in #28?

@giordano giordano closed this as completed May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants