Skip to content

Conversation

@ericpts
Copy link

@ericpts ericpts commented Apr 6, 2018

No description provided.

ericpts added 3 commits April 7, 2018 00:26
* Add advanced_tree generator
* Add countfefete example
* Move common benchmarking functionality to benchmark.hpp
* Create binaries under bin/
@ericpts
Copy link
Author

ericpts commented Apr 6, 2018

Building a tree of size N should now only take O(NlogN) time.

@ericpts
Copy link
Author

ericpts commented Apr 24, 2018

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)
Copy link
Owner

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
Copy link
Owner

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)
Copy link
Owner

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)
Copy link
Owner

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants