put using json=nlohmann:ordered_json under namespace platform

This commit is contained in:
2024-05-17 18:32:01 +02:00
parent a3c4bde460
commit 577351eda5
10 changed files with 19 additions and 17 deletions

View File

@@ -2,8 +2,9 @@
#include <string> #include <string>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
using json = nlohmann::ordered_json;
namespace platform { namespace platform {
using json = nlohmann::ordered_json;
class BestResults { class BestResults {
public: public:
explicit BestResults(const std::string& path, const std::string& score, const std::string& model, const std::string& dataset, bool friedman, double significance = 0.05) explicit BestResults(const std::string& path, const std::string& score, const std::string& model, const std::string& dataset, bool friedman, double significance = 0.05)

View File

@@ -5,10 +5,9 @@
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
#include "reports/ExcelFile.h" #include "reports/ExcelFile.h"
using json = nlohmann::ordered_json;
namespace platform { namespace platform {
using json = nlohmann::ordered_json;
class BestResultsExcel : public ExcelFile { class BestResultsExcel : public ExcelFile {
public: public:
BestResultsExcel(const std::string& score, const std::vector<std::string>& datasets); BestResultsExcel(const std::string& score, const std::vector<std::string>& datasets);

View File

@@ -5,9 +5,9 @@
#include <map> #include <map>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
using json = nlohmann::ordered_json;
namespace platform { namespace platform {
using json = nlohmann::ordered_json;
struct WTL { struct WTL {
int win; int win;
int tie; int tie;

View File

@@ -2,8 +2,8 @@
#define SCORES_H #define SCORES_H
#include <vector> #include <vector>
#include <string> #include <string>
#include <torch/torch.h>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
#include <torch/torch.h>
namespace platform { namespace platform {
using json = nlohmann::ordered_json; using json = nlohmann::ordered_json;
class Scores { class Scores {

View File

@@ -8,7 +8,6 @@
namespace platform { namespace platform {
using json = nlohmann::ordered_json; using json = nlohmann::ordered_json;
class DatasetsConsole : public ReportsPaged { class DatasetsConsole : public ReportsPaged {
public: public:
static const int BALANCE_LENGTH; static const int BALANCE_LENGTH;

View File

@@ -3,10 +3,9 @@
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
#include "reports/ExcelFile.h" #include "reports/ExcelFile.h"
using json = nlohmann::ordered_json;
namespace platform { namespace platform {
using json = nlohmann::ordered_json;
class DatasetsExcel : public ExcelFile { class DatasetsExcel : public ExcelFile {
public: public:
DatasetsExcel(); DatasetsExcel();

View File

@@ -1,14 +1,14 @@
#pragma once #ifndef REPORTBASE_H
#define REPORTBASE_H
//#include "main/Scores.h"
#include <string> #include <string>
#include <iostream>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
#include "common/Paths.h" #include "common/Paths.h"
#include "common/Symbols.h" #include "common/Symbols.h"
using json = nlohmann::ordered_json;
namespace platform { namespace platform {
using json = nlohmann::ordered_json;
class ReportBase { class ReportBase {
public: public:
explicit ReportBase(json data_, bool compare); explicit ReportBase(json data_, bool compare);
@@ -36,3 +36,4 @@ namespace platform {
bool existBestFile = true; bool existBestFile = true;
}; };
}; };
#endif

View File

@@ -1,11 +1,13 @@
#pragma once #ifndef REPORT_EXCEL_H
#define REPORT_EXCEL_H
#include <map> #include <map>
#include <xlsxwriter.h> #include <xlsxwriter.h>
#include "common/Colors.h" #include "common/Colors.h"
#include "ReportBase.h" #include "ReportBase.h"
#include "ExcelFile.h" #include "ExcelFile.h"
namespace platform { namespace platform {
using json = nlohmann::ordered_json;
class ReportExcel : public ReportBase, public ExcelFile { class ReportExcel : public ReportBase, public ExcelFile {
public: public:
explicit ReportExcel(json data_, bool compare, lxw_workbook* workbook, lxw_worksheet* worksheet = NULL); explicit ReportExcel(json data_, bool compare, lxw_workbook* workbook, lxw_worksheet* worksheet = NULL);
@@ -22,3 +24,4 @@ namespace platform {
void header_notes(int row); void header_notes(int row);
}; };
}; };
#endif

View File

@@ -3,9 +3,9 @@
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
#include "reports/ExcelFile.h" #include "reports/ExcelFile.h"
using json = nlohmann::ordered_json;
namespace platform { namespace platform {
using json = nlohmann::ordered_json;
class ResultsDatasetExcel : public ExcelFile { class ResultsDatasetExcel : public ExcelFile {
public: public: