From 6a0a2540bb91161127d3bb39b2aac2eff78c7828 Mon Sep 17 00:00:00 2001 From: Richard Thier Date: Tue, 16 Aug 2022 12:41:19 +0200 Subject: [PATCH] re-add other test cases - now fails constant because infinite recursion to be fixed for spsort --- space_partitioning_sort/spsort.h | 3 +++ ypsu.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/space_partitioning_sort/spsort.h b/space_partitioning_sort/spsort.h index 82d13eb..94f4d66 100644 --- a/space_partitioning_sort/spsort.h +++ b/space_partitioning_sort/spsort.h @@ -157,7 +157,10 @@ inline void internal_spsort(uint32_t *t, int n, int m, uint32_t low, uint32_t mi // Re-pivot the mid if needed if(lefts < m) { + // Left can be simple-sorted binsertion_sort(t, left); + + // Check the right now if(rights < m) { // Balance in both small-extremal // means we can small-sort both. diff --git a/ypsu.cpp b/ypsu.cpp index c0fb400..f1362c0 100644 --- a/ypsu.cpp +++ b/ypsu.cpp @@ -32,8 +32,8 @@ worst[name] = std::max(worst[name], seconds); } std::vector inputtypes = { - /*"constant", "asc", "desc", "ascasc", "ascdesc", - "descasc", "descdesc", "smallrange",*/ "rand", + "constant", "asc", "desc", "ascasc", "ascdesc", + "descasc", "descdesc", "smallrange", "rand", }; std::vector geninput(const std::string &type, int n) { std::vector v(n);