-
Notifications
You must be signed in to change notification settings - Fork 67
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
Hashing over interval trees #15
Open
lilrachel1985
wants to merge
41
commits into
revert-5-master
Choose a base branch
from
master
base: revert-5-master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Revert "Change spurious use of malloc to new"
Cleanup: Remove "using namespace std;" and add constness to searches.
return value type fix & change default value type
fixed clang compilation error
Replace hard-coded compiler for portability.
Add install target
When code like: intervalTree a; //Fill a intervalTree b; //Fill b b=a; was executed, b's contents would not get deleted before being overwritten by a copy of a's contents. Though I could have fixed the bug directly, I fixed that class of bugs by making left and right unique_ptr. Changing to unique_ptr also simplified the code allowing the destructor to be defaulted and the assignment code for left and right to be reduced to two assignments. (If we were using C++ 14 the copyTree helper function could have been omitted too since it has make_unique.)
Fix memory leak
Rather than reinventing the wheel to add the unit tests, I just added the single-include header from the Catch unit-test framework. https://github.com/philsquared/Catch
Two places in the code did not need modifiable references: copyTree and the iteration over the intervals. I also made a note that the from-vector constructor changes the order of its input vector.
Add some unit tests
…rvals to values. Remove default template argument.
…non-const reference!) and makes use of the rvalue reference for efficency.
Major rework, including swapping order of the template args so it's more like std::map.
Add option to put the library in its own namespace
So that Debian can pass hardening flags
Make build system more flexible
Omission of this include will cause build failures with GCC 11. https://www.gnu.org/software/gcc/gcc-11/porting_to.html Original bug report: https://bugs.debian.org/984212
include <limits> for numeric_limits
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
can you explain how this can be done