Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
Adding functions rbegin() and rend() functions to matrix class.#19967
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
vpisarev commentedApr 30, 2021
@HattrickGenerator, thank you for the contribution! Please, add regression tests for this functionality. |
HattrickGenerator commentedMay 2, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@vpisarev, thanks for your comment. A contributor wrote a test for it and I merged it. Do I open a new PR in order to re-run the jenkins builds + tests? |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
alalek left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Well done 👍
alalek commentedMay 18, 2021
Please:
|
This is important to be more standard compliant with C++ and an ever increasing number of people using standard algorithms for better code readability- and maintainability.The functions are copy pated from their counterparts (even though they should probably call the counterparts but this gave me some troube).They return iterators using std::reverse_iteratorsFollow up of an open feature request:opencv#4641
…don't need to repeat the template argument.An instantiating cv::Mat_<int> for example can call it's rbegin() function and doesn't need rbegin<int>() with this convience addition.Follows what is done for forward iterators
…ed for opencv mat constructor)
HattrickGenerator commentedMay 20, 2021
Fixed the warning under windows and rebased my branch on master to keep a linear history. |
* Adding functions rbegin() and rend() functions to matrix class.This is important to be more standard compliant with C++ and an ever increasing number of people using standard algorithms for better code readability- and maintainability.The functions are copy pated from their counterparts (even though they should probably call the counterparts but this gave me some troube).They return iterators using std::reverse_iteratorsFollow up of an open feature request:opencv#4641* Fix rbegin() and rend() and provide tests for them* Removing unnecessary whitespaces* Adding rbegin and rend to Mat_ class with the right parameters so we don't need to repeat the template argument.An instantiating cv::Mat_<int> for example can call it's rbegin() function and doesn't need rbegin<int>() with this convience addition.Follows what is done for forward iterators* static cast the vector size (return size_t) to an int (that is required for opencv mat constructor)Co-authored-by: Stefan <stefan.gerl@tum.de>
Uh oh!
There was an error while loading.Please reload this page.
This is important to be more standard compliant with C++ and an ever increasing number of people using standard algorithms for better code readability- and maintainability.
The functions are copy pasted from their counterparts (even though they should probably call the counterparts but this gave me some trouble).
They return iterators using std::reverse_iterators
Follow up of an open feature request:
#4641
Edit: Additionally there should be a test implemented for it. This still has to be done.
Pull Request Readiness Checklist
See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.