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
Improve HashMap/Set situation #137
Conversation
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.
The changes look good to me, apart from one or two minor things. Especially the comparator when creating the patterns vector looks a lot cleaner.
How would you suggest we go about switching out the current usage of std::unordered_map with HashMap? I'd suggest creating one pr that replaces all usages of unordered_map with hash map, but depending on the amount of other pending changes that might be unfeasible due to the amount of files changed.
test/HashMapTest.cpp
Outdated
ASSERT_EQ(maptwo["bar"], 41); | ||
}; | ||
|
||
int main(int argc, char** argv) { |
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.
The other tests link against 'gtest_main' for a main method.
I've changed all possible uses in master using |
This starts work on issue #136 by using inheritance plus using declerations instead of explicit method wrapping. This also fixes the broken insert() method which couldn't actually be used as no call to it could ever compile. Also adds rudimentary sanity tests (the underlying implementations should be well tested already).
This makes IndexTest independent of the order of the entries in the patternCounts hash map
Used `sed` to refactor `std::unordered_map` except one where `ad_utility::HashMap` currently doesn't work because of missing `DELETED_KEY` or `iterator`
This starts work on issue #136 by using inheritance plus using
declerations instead of explicit method wrapping. This also fixes the
broken insert() method which couldn't actually be used as no call to it
could ever compile.
Also adds rudimentary sanity tests (the underlying implementations
should be well tested already).