Skip to content

Quickcheck and replace swap with stl

Quckcheck submodule

This add quickcheck as submodule in Tests/ along with some tests of the quicksort routine.

Also open for discussion whether to include external libraries like tclap and logog as submodules. Did I miss some arguments against it?

quicksort and swap

Passing tests allows painfull (please check it one more time) transition from BaseLib::swap to std::swap.

In quicksort() the sorting is not stable: the permutation vector may change, even all elements of the vector to be sorted are already sorted. i.e. after:

std::vector<int> input = { 10, 10 };
std::vector<size_t> perm = { 0, 1 };
BaseLib::quicksort(input, perm); // Call simplified here.

the vector perm might be { 1, 0 }. Is this feature or bug?


Have a nice weekend anyway! 🍺

Merge request reports