Continue with grid_experiment refactor

This commit is contained in:
2024-12-21 14:18:47 +01:00
parent 1cc19a7b19
commit 0318dcf8e5
7 changed files with 49 additions and 119 deletions

22
src/grid/GridBase.cpp Normal file
View File

@@ -0,0 +1,22 @@
#include "common/DotEnv.h"
#include "common/Paths.h"
#include "GridBase.h"
namespace platform {
GridBase::GridBase(struct ConfigGrid& config)
{
this->config = config;
if (config.smooth_strategy == "ORIGINAL")
smooth_type = bayesnet::Smoothing_t::ORIGINAL;
else if (config.smooth_strategy == "LAPLACE")
smooth_type = bayesnet::Smoothing_t::LAPLACE;
else if (config.smooth_strategy == "CESTNIK")
smooth_type = bayesnet::Smoothing_t::CESTNIK;
else {
std::cerr << "GridBase: Unknown smoothing strategy: " << config.smooth_strategy << std::endl;
exit(1);
}
}
}