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

Spherical manifolds etc. #60

Closed
rafaqz opened this issue Aug 26, 2020 · 2 comments
Closed

Spherical manifolds etc. #60

rafaqz opened this issue Aug 26, 2020 · 2 comments

Comments

@rafaqz
Copy link
Owner

rafaqz commented Aug 26, 2020

It would be ideal if GeoData could represent spherical dimensions where the index wraps without a start/end.

And possibly more complex manifolds.

In discussions with @juliohm https://discourse.julialang.org/t/ann-geodata-jl/45502/5
I suggested a Speherical IndexMode to allow spherical indexing and selectors.

This and other similar properties require a new type to dispatch on for index lookup, and also new behaviours of Int getindex that wrap values outside of the axis range back into it.

Probably a better method than a new indexmode Spherical (which uses inheritance) is a composition/trait hybrid, which would be a manually set field for all AbstractSampled index modes. It could be called geometry and return values in Geometry, of Circular and Linear or similar. Other index modes can default to a trait. So:

geometry(mode::IndexMode) = Linear()
geometry(mode::AbstractSampled) = mode.geometry
@rafaqz
Copy link
Owner Author

rafaqz commented Oct 15, 2020

Obviously, indexing into a Circular mode dim with anything other than : would convert it to Linear as it would no longer completely wrap around

@rafaqz
Copy link
Owner Author

rafaqz commented Feb 1, 2024

We have this now with Cyclic lookups

@rafaqz rafaqz closed this as completed Mar 10, 2024
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

1 participant