25 bool rc = (stat(file.c_str(), &buffer) == 0);
27 spdlog::error(
"File '{}' doesn't exists !!! ", file);
39 YAML::Node envsType =
mConfig[
"envs"];
40 for (std::size_t i = 0; i < envsType.size(); i++) {
42 fmt::format(
"{}={}", envsType[i][
"name"].as<std::string>(), envsType[i][
"value"].as<std::string>()));
47 YAML::Node axes =
mConfig[
"space"][
"axes"];
48 for (
auto ax : axes) {
50 spdlog::warn(
"Name of axis was not found !!! Skipping axis ...");
54 spdlog::warn(
"Min value in axis was not found !!! Skipping axis [{}] ...", ax[
"name"].as<std::string>());
58 spdlog::warn(
"Max value in axis was not found !!! Skipping axis [{}] ...", ax[
"name"].as<std::string>());
62 spdlog::warn(
"Level value in axis was not found !!! Skipping axis [{}] ...", ax[
"name"].as<std::string>());
65 NDM::Axis a(ax[
"min"].as<double>(), ax[
"max"].as<double>());
66 if (ax[
"isbin"]) a.
is_bin(ax[
"isbin"].as<bool>());
67 if (ax[
"info"]) a.
info(ax[
"info"].as<std::string>());
69 mLevels.push_back(ax[
"level"].as<int>());
80 std::cout <<
mConfig << std::endl;
Axis object in n-dimensional space.
void is_bin(bool b)
Sets user defined maximum.
void info(std::string i)
Sets info string.
std::vector< int > mLevels
Levels for each axis.
std::vector< std::string > mEnvs
List of env variables.
YAML::Node mConfig
YAML Configuration.
virtual bool load(std::string file)
virtual void print() const
Space * mSpace
Space object.
Space object in n-dimensional space.