-
Couldn't load subscription status.
- Fork 0
Fix intervaltree min max #3
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
Fix intervaltree min max #3
Conversation
3673bfa to
c59e286
Compare
| IntervalStartCmp()); | ||
| if (!ivals.empty()) { | ||
| center = (minmaxStart.first->start + minmaxStop.second->stop) / 2; | ||
| { // This scope is because afterward we sort and so these two iterators |
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.
This is just scoping
| } | ||
|
|
||
| Scalar min() const { | ||
| assert(!empty()); |
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.
These are the fixes.
| return Catch::Session().run( argc, argv ); | ||
| } | ||
|
|
||
| TEST_CASE( "Test min/max" ) { |
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.
This tests the fixes.
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.
Looks good
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.
LGTM. Just a thought, is it a good idea to just a cache the min and max when we are building the tree for each level?
No description provided.