Replace #define ... with pragma once

This commit is contained in:
2024-03-10 12:50:35 +01:00
parent 51f32113c0
commit 0010c840d1
33 changed files with 84 additions and 111 deletions

View File

@@ -1,5 +1,5 @@
#ifndef EXPERIMENT_H
#define EXPERIMENT_H
#pragma once
#include <torch/torch.h>
#include <nlohmann/json.hpp>
#include <string>
@@ -42,5 +42,4 @@ namespace platform {
int nfolds{ 0 };
int max_name{ 7 }; // max length of dataset name for formatting (default 7)
};
}
#endif
}

View File

@@ -1,5 +1,5 @@
#ifndef HYPERPARAMETERS_H
#define HYPERPARAMETERS_H
#pragma once
#include <string>
#include <map>
#include <vector>
@@ -20,4 +20,3 @@ namespace platform {
std::map<std::string, json> hyperparameters;
};
} /* namespace platform */
#endif /* HYPERPARAMETERS_H */

View File

@@ -1,5 +1,5 @@
#ifndef MODELS_H
#define MODELS_H
#pragma once
#include <map>
#include <bayesnet/BaseClassifier.h>
#include <bayesnet/ensembles/AODE.h>
@@ -39,4 +39,3 @@ namespace platform {
Registrar(const std::string& className, function<bayesnet::BaseClassifier* (void)> classFactoryFunction);
};
}
#endif

View File

@@ -1,5 +1,5 @@
#ifndef RESULT_H
#define RESULT_H
#pragma once
#include <map>
#include <vector>
#include <string>
@@ -48,4 +48,3 @@ namespace platform {
double score = 0.0;
};
};
#endif

View File

@@ -1,5 +1,5 @@
#ifndef MODEL_REGISTER_H
#define MODEL_REGISTER_H
#pragma once
static platform::Registrar registrarT("TAN",
[](void) -> bayesnet::BaseClassifier* { return new bayesnet::TAN();});
static platform::Registrar registrarTLD("TANLd",
@@ -27,5 +27,4 @@ static platform::Registrar registrarSvc("SVC",
static platform::Registrar registrarRaF("RandomForest",
[](void) -> bayesnet::BaseClassifier* { return new pywrap::RandomForest();});
static platform::Registrar registrarXGB("XGBoost",
[](void) -> bayesnet::BaseClassifier* { return new pywrap::XGBoost();});
#endif
[](void) -> bayesnet::BaseClassifier* { return new pywrap::XGBoost();});