Skip to content

Add multi_slice_* methods (supports nested tuples) #716

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
wants to merge 2 commits into from

Conversation

jturner314
Copy link
Member

@jturner314 jturner314 commented Sep 19, 2019

This implements suggestion 4 described in this comment. It provides a .mutli_slice_mut() method for ArrayBase and a .multi_slice_move() method for ArrayViewMut. The slicing information can be passed as (possibly nested) tuples up to length 6. By nesting tuples, it's possible to create arbitrarily many slices.

See also the alternative implementation in #717, which I prefer.

The implementation is done, but the tests need some improvement.

@jturner314 jturner314 changed the title Replace multislice! macro with a trait and methods Replace multislice! macro with a trait and methods (supports nested tuples) Sep 19, 2019
@jturner314 jturner314 force-pushed the multislice-methods branch 2 times, most recently from d49ba1b to 3bb5e7d Compare September 19, 2019 20:03
@jturner314 jturner314 changed the title Replace multislice! macro with a trait and methods (supports nested tuples) Add multi_slice_* methods (supports nested tuples) Sep 19, 2019
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

Successfully merging this pull request may close these issues.

1 participant