Skip to content

Use float64 as key in bptree #1

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

Closed
nrkfeller opened this issue Sep 1, 2016 · 2 comments
Closed

Use float64 as key in bptree #1

nrkfeller opened this issue Sep 1, 2016 · 2 comments

Comments

@nrkfeller
Copy link

As it currently stands. It seems I can only use "types.Int" as keys in the bptree is there a way we can use float64 instead?

@timtadh
Copy link
Owner

timtadh commented Sep 1, 2016

@nrkfeller you just need to implement the types.Hashable interface for float. I haven't implemented it because I haven't needed it yet. I just did a quick implementation in #2 . Please test that out and let me know if works. If you wanted to write a test that would be great as well but do not feel obligated.

@nrkfeller
Copy link
Author

Beautiful! I will write tests when I have a bit of time. Thank you!

@timtadh timtadh closed this as completed Aug 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants