From ad168d13ba61b5c42ac7389840a2e89b0a767579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana=20G=C3=B3mez?= Date: Thu, 11 Apr 2024 11:45:43 +0200 Subject: [PATCH] Add stratified and discretize to b_manage list --- src/manage/ManageScreen.cpp | 4 ++-- src/results/Result.cpp | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/manage/ManageScreen.cpp b/src/manage/ManageScreen.cpp index 7b1e402..f2d58dd 100644 --- a/src/manage/ManageScreen.cpp +++ b/src/manage/ManageScreen.cpp @@ -206,11 +206,11 @@ namespace platform { // int maxModel = results.maxModelSize(); int maxTitle = results.maxTitleSize(); - std::vector header_lengths = { 3, 10, maxModel, 10, 9, 12, 3, 7, maxTitle }; + std::vector header_lengths = { 3, 10, maxModel, 10, 9, 12, 2, 3, 7, maxTitle }; std::cout << Colors::RESET(); std::string arrow_dn = Symbols::down_arrow + " "; std::string arrow_up = Symbols::up_arrow + " "; - std::vector header_labels = { " #", "Date", "Model", "Score Name", "Score", "Platform", "C/P", "Time", "Title" }; + std::vector header_labels = { " #", "Date", "Model", "Score Name", "Score", "Platform", "SD", "C/P", "Time", "Title" }; std::vector sort_fields = { "Date", "Model", "Score", "Time" }; for (int i = 0; i < header_labels.size(); i++) { std::string suffix = "", color = Colors::GREEN(); diff --git a/src/results/Result.cpp b/src/results/Result.cpp index 988f7cb..0cc2c85 100644 --- a/src/results/Result.cpp +++ b/src/results/Result.cpp @@ -82,6 +82,9 @@ namespace platform { { auto tmp = ConfigLocale(); std::stringstream oss; + std::string s = data["stratified"].get() ? "S" : ""; + std::string d = data["discretized"].get() ? "D" : ""; + std::string sd = s + d; auto duration = data["duration"].get(); double durationShow = duration > 3600 ? duration / 3600 : duration > 60 ? duration / 60 : duration; std::string durationUnit = duration > 3600 ? "h" : duration > 60 ? "m" : "s"; @@ -90,6 +93,7 @@ namespace platform { oss << std::setw(10) << std::left << data["score_name"].get() << " "; oss << std::right << std::setw(9) << std::setprecision(7) << std::fixed << score << " "; oss << std::left << std::setw(12) << data["platform"].get() << " "; + oss << std::left << std::setw(2) << sd << " "; auto completeString = isComplete() ? "C" : "P"; oss << std::setw(1) << " " << completeString << " "; oss << std::setw(5) << std::setprecision(2) << std::fixed << durationShow << " " << durationUnit << " ";