-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add advanced tree utilities #1
base: master
Are you sure you want to change the base?
Conversation
* Add advanced_tree generator * Add countfefete example * Move common benchmarking functionality to benchmark.hpp * Create binaries under bin/
Building a tree of size N should now only take O(NlogN) time. |
Please take a look @adrian-budau |
@@ -37,10 +33,17 @@ lint: | |||
find . -name "*.hpp" | xargs python2 cpplint.py --filter=-legal --counting=detailed | |||
|
|||
benchmark: | |||
$(CXX) $(CFLAGS) examples/benchmark.cpp -o examples/benchmark $(LDFLAGS) | |||
./examples/benchmark | |||
$(CXX) $(CFLAGS) -DINPUT_GENERATOR_DEBUG examples/benchmark.cpp -o bin/benchmark $(LDFLAGS) |
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.
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 |
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.
Countfefete shouldnt be here i guess?
namespace inputGenerator { | ||
|
||
template<typename int_t> | ||
static int random_int(int_t left, int_t right) |
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.
there is randomInt<int_t> exactly like this
|
||
template<typename T> | ||
typename std::vector<T>::const_iterator | ||
random_choice(const std::vector<T>& v) |
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.
there is randomElement (gives item not iterator though)
No description provided.