Continue TeX output

This commit is contained in:
2024-09-02 20:30:47 +02:00
parent 4545f76667
commit 4dbd76df55
6 changed files with 143 additions and 71 deletions

View File

@@ -6,12 +6,19 @@
namespace platform {
class Paths {
public:
static std::string results() { return "results/"; }
static std::string hiddenResults() { return "hidden_results/"; }
static std::string excel() { return "excel/"; }
static std::string grid() { return "grid/"; }
static std::string graphs() { return "graphs/"; }
static std::string tex() { return "tex/"; }
static std::string createIfNotExists(const std::string& folder)
{
if (!std::filesystem::exists(folder)) {
std::filesystem::create_directory(folder);
}
return folder;
}
static std::string results() { return createIfNotExists("results/"); }
static std::string hiddenResults() { return createIfNotExists("hidden_results/"); }
static std::string excel() { return createIfNotExists("excel/"); }
static std::string grid() { return createIfNotExists("grid/"); }
static std::string graphs() { return createIfNotExists("graphs/"); }
static std::string tex() { return createIfNotExists("tex/"); }
static std::string datasets()
{
auto env = platform::DotEnv();

View File

@@ -36,5 +36,15 @@ namespace platform {
}
return result;
}
double compute_std(std::vector<double> values, double mean)
{
// Compute standard devation of the values
double sum = 0.0;
for (const auto& value : values) {
sum += std::pow(value - mean, 2);
}
double variance = sum / values.size();
return std::sqrt(variance);
}
}
#endif