Complete comparison with ZeroR

This commit is contained in:
2023-09-19 17:55:03 +02:00
parent 1bdfbd1620
commit f69f415b92
4 changed files with 99 additions and 15 deletions

View File

@@ -8,9 +8,20 @@
namespace platform {
using namespace std;
const int MAXLL = 128;
class Symbols {
public:
inline static const string check_mark{ "\u2714" };
inline static const string exclamation{ "\u2757" };
inline static const string black_star{ "\u2605" };
inline static const string cross{ "\u2717" };
inline static const string upward_arrow{ "\u27B6" };
inline static const string down_arrow{ "\u27B4" };
inline static const string equal_best{ check_mark };
inline static const string better_best{ black_star };
};
class ReportExcel : public ReportBase {
public:
explicit ReportExcel(json data_) : ReportBase(data_) { createFile(); };
explicit ReportExcel(json data_);
virtual ~ReportExcel() { closeFile(); };
private:
void writeString(int row, int col, const string& text, const string& style = "");
@@ -21,14 +32,17 @@ namespace platform {
void setProperties();
void createFile();
void closeFile();
void showSummary();
lxw_workbook* workbook;
lxw_worksheet* worksheet;
map<string, lxw_format*> styles;
int row = 0;
int normalSize = 14; //font size for report body
uint32_t colorTitle = 0xB1A0C7;
uint32_t colorOdd = 0xDCE6F1;
uint32_t colorEven = 0xFDE9D9;
map<string, int> summary;
int row;
int normalSize; //font size for report body
uint32_t colorTitle;
uint32_t colorOdd;
uint32_t colorEven;
double margin;
const string fileName = "some_results.xlsx";
void header() override;
void body() override;
@@ -36,6 +50,7 @@ namespace platform {
void createStyle(const string& name, lxw_format* style, bool odd);
void addColor(lxw_format* style, bool odd);
lxw_format* efectiveStyle(const string& name);
string compareResult(const string& dataset, double result);
};
};
#endif // !REPORTEXCEL_H