BAN: Restructure sort functions and namespaces

This commit is contained in:
2023-12-08 18:58:47 +02:00
parent b523ccb893
commit 2b927b9729
3 changed files with 26 additions and 26 deletions

View File

@@ -116,7 +116,7 @@ i64 puzzle(FILE* fp, bool joker)
));
}
BAN::sort(hands.begin(), hands.end(),
BAN::sort::sort(hands.begin(), hands.end(),
[joker] (const Hand& lhs, const Hand& rhs) {
return hand_score(lhs, joker) < hand_score(rhs, joker);
}

View File

@@ -31,11 +31,11 @@ bool is_sorted(BAN::Vector<T>& vec)
int main()
{
srand(time(0));
TEST("exchange sort", BAN::sort_exchange, 100);
TEST("exchange sort", BAN::sort_exchange, 1000);
TEST("exchange sort", BAN::sort_exchange, 10000);
TEST("exchange sort", BAN::sort::exchange_sort, 100);
TEST("exchange sort", BAN::sort::exchange_sort, 1000);
TEST("exchange sort", BAN::sort::exchange_sort, 10000);
TEST("quick sort", BAN::sort_quick, 100);
TEST("quick sort", BAN::sort_quick, 1000);
TEST("quick sort", BAN::sort_quick, 10000);
TEST("quick sort", BAN::sort::quick_sort, 100);
TEST("quick sort", BAN::sort::quick_sort, 1000);
TEST("quick sort", BAN::sort::quick_sort, 10000);
}