-
Notifications
You must be signed in to change notification settings - Fork 16
[GAML] rework of slicing for lists and matrices #755
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
Conversation
- adds simple slice/submatrix operators to handle matrices and fields - adds a base unit test model to make sure all case will be handled - fixes some documentation - adds a new alias "slice" for "copy_between" - adds a new definition of "copy_between" with a parameter to handle steps - beginning of handling negative index to represent counting from the end - Fixes #754
- remove the slice alias from copy_between. Now slice will be a completely different operator that includes both bounds for better functionalities - adds a sublist operator that returns a list composed of the values at the indices given as parameter - slice is now inclusive of the upper bound making reverse-like manipulation possible - makes implicit step work both ways - adding more cases to the unit test file - better documentation and method renaming for better understanding
… both way traversal + complete unit test file
|
I'm pretty much done, finally I've went for a separation between the
To make this possible I had to specify that the "end" of the range of value is inclusive, that's why I had to part away from I think the implementation for matrices is currently not optimal but it avoids code repetition, so this part is still improvable but it's working. As for test cases I'll gladly take new ideas if you have any. Waiting for your feedbacks/improvements before closing |
…e cases also creates a matrixLike method for internal use: it creates a matrix or field of the same type as the one given in parameters but with other dimensions and using the default value
What has been done so far:
What's left: