Add advanced tree utilities#1
Open
ericpts wants to merge 3 commits intoadrian-budau:masterfrom
Open
Conversation
* Add advanced_tree generator * Add countfefete example * Move common benchmarking functionality to benchmark.hpp * Create binaries under bin/
Author
|
Building a tree of size N should now only take O(NlogN) time. |
Author
|
Please take a look @adrian-budau |
| benchmark: | ||
| $(CXX) $(CFLAGS) examples/benchmark.cpp -o examples/benchmark $(LDFLAGS) | ||
| ./examples/benchmark | ||
| $(CXX) $(CFLAGS) -DINPUT_GENERATOR_DEBUG examples/benchmark.cpp -o bin/benchmark $(LDFLAGS) |
Owner
There was a problem hiding this comment.
We can probably run the benchmark without the debug checks?
| $(CXX) $(CFLAGS) examples/benchmark.cpp -o examples/benchmark $(LDFLAGS) | ||
| ./examples/benchmark | ||
| $(CXX) $(CFLAGS) -DINPUT_GENERATOR_DEBUG examples/benchmark.cpp -o bin/benchmark $(LDFLAGS) | ||
| ./bin/benchmark |
Owner
There was a problem hiding this comment.
Countfefete shouldnt be here i guess?
| namespace inputGenerator { | ||
|
|
||
| template<typename int_t> | ||
| static int random_int(int_t left, int_t right) |
Owner
There was a problem hiding this comment.
there is randomInt<int_t> exactly like this
|
|
||
| template<typename T> | ||
| typename std::vector<T>::const_iterator | ||
| random_choice(const std::vector<T>& v) |
Owner
There was a problem hiding this comment.
there is randomElement (gives item not iterator though)
This file contains hidden or 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
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.
No description provided.