You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is my first try at really using xtensor... so please excuse me if I missed something.
In my use case, I have to create a block matrix, so I want to create a list of contiguous ranges, each new range starting at the stop value of the previous one. Right now I cannot use the xt::range (actually xrange_adaptor) facility as it is impossible to access to the range components.
So the question is would it be acceptable to give const access to the range components (start, stop, and step) so that range can be used in algorithms. Otherwise, I need to create my own range class which will be redundant....
It's just a matter of adding the const accessors to the private fields (I can submit a patch if the idea is accepted). This would also be helpful for debugging purposes as the user can then print the computed ranges...
By the way, I do not understand why the methods normalize and get_stepped_range are not static and private. Static potentially slightly improves the efficiency (not having to pass this and the compiler may use the fact that it does not depend on the object members).
The text was updated successfully, but these errors were encountered:
No problem for adding accessors to the fields. Regarding the normalize and get_stepped_range, this sounds as an acceptable change (although I'm not sure that this can be a bottleneck).
This is my first try at really using xtensor... so please excuse me if I missed something.
In my use case, I have to create a block matrix, so I want to create a list of contiguous ranges, each new range starting at the stop value of the previous one. Right now I cannot use the xt::range (actually xrange_adaptor) facility as it is impossible to access to the range components.
So the question is would it be acceptable to give const access to the range components (start, stop, and step) so that range can be used in algorithms. Otherwise, I need to create my own range class which will be redundant....
It's just a matter of adding the const accessors to the private fields (I can submit a patch if the idea is accepted). This would also be helpful for debugging purposes as the user can then print the computed ranges...
By the way, I do not understand why the methods normalize and get_stepped_range are not static and private. Static potentially slightly improves the efficiency (not having to pass this and the compiler may use the fact that it does not depend on the object members).
The text was updated successfully, but these errors were encountered: