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

Support Hilbert derivatives. #8

Open
hallahan opened this issue Oct 29, 2022 · 3 comments
Open

Support Hilbert derivatives. #8

hallahan opened this issue Oct 29, 2022 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@hallahan
Copy link

How hard would it be to get the performance gains of fast_hilbert, but also be able to create Xian Liu's variants?

https://www.sciencedirect.com/science/article/abs/pii/S0096300302008081?via%3Dihub

Looks like hilbert_2d does this.

https://crates.io/crates/hilbert_2d

I wonder if the variants provide significant performance differences regarding the use of the curve as a spatial index?

@becheran
Copy link
Owner

Not sure yet. Just had a brief look on the Moore type. I would assume that it is not too hard to re-use the LUT idea and generate another for the Moore type. Performance wise I don't see how there would be a difference.

@hallahan
Copy link
Author

hallahan commented Oct 31, 2022

If the lowest_order optimization you have in #9 is significant, sorting OpenStreetMap (or any planet scale) data would be fastest for this Hilbert variant. I had to flip around one of the images in the hilbert_2d docs, as this one isn't supported. You would sort in reverse.

liu

Europe is the most data dense by a long shot. India, SE Asia come in second place.

@becheran becheran added the enhancement New feature or request label Oct 31, 2022
@becheran becheran added this to the 2.1.0 milestone Oct 31, 2022
@becheran
Copy link
Owner

@hallahan I managed to implement the moore variant using the LUT logic I use to compote the hilber curve. It was a bit more challenging than I thought because there was a hidden first state for the moore curve which is not directly repeated for higher order/more bits.

The other LIU variants use more than 4 states and won't fit into the 4 state LUT idea that I use in the fast_hilbert crate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants