From c49d160bd59dbc609b7f4c677233ecf133800d51 Mon Sep 17 00:00:00 2001
From: Trianta <56975502+Trimutex@users.noreply.github.com>
Date: Wed, 17 Apr 2024 14:43:47 -0500
Subject: [PATCH] Split print function into three pieces

---
 src/arff/arff.cpp    | 12 +++++++++++-
 src/arff/arff.hpp    |  4 +++-
 src/arff/main.cpp    |  3 ++-
 src/onerule/main.cpp |  2 +-
 4 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/arff/arff.cpp b/src/arff/arff.cpp
index be00b51..bf1a6e6 100644
--- a/src/arff/arff.cpp
+++ b/src/arff/arff.cpp
@@ -81,11 +81,16 @@ namespace ARFF {
         TestIntegrity();
     }
 
-    void Arff::Print(void) {
+    // Print generic data information
+    // Number of attributes and size of database
+    void Arff::PrintOverview(void) {
         std::cout << attributeList.size() << " attributes\n";
         std::cout << database.size() << " examples\n";
         std::cout << std::endl;
+    }
 
+    // Print full data information
+    void Arff::PrintData(void) {
         std::cout << "Attribute (#): values\n";
         for (AttributeType type : attributeList) {
             std::cout << type.attribute << " (" << type.values.size() << "):";
@@ -107,6 +112,11 @@ namespace ARFF {
         std::cout << std::endl;
     }
 
+    // Print result of applying OneR
+    // TODO: Create function
+    void PrintOneR(void) {
+    }
+
     // Add the attribute to the list
     void Arff::AddAttribute(std::string line) {
         std::stringstream parser(line);
diff --git a/src/arff/arff.hpp b/src/arff/arff.hpp
index 8afc7af..a38f688 100644
--- a/src/arff/arff.hpp
+++ b/src/arff/arff.hpp
@@ -29,7 +29,9 @@ namespace ARFF {
     public:
         Arff() = default;
         void Read(std::string filename);
-        void Print(void);
+        void PrintOverview(void);
+        void PrintData(void);
+        void PrintOneR(void);
     private:
         std::string relation;
         std::vector<AttributeType> attributeList;
diff --git a/src/arff/main.cpp b/src/arff/main.cpp
index 4f24fae..5070438 100644
--- a/src/arff/main.cpp
+++ b/src/arff/main.cpp
@@ -9,5 +9,6 @@ int main(int argc, char* argv[]) {
     ARFF::ParseArguments(argc, argv);
     ARFF::Arff data;
     data.Read(ARFF::GetDataFilename());
-    data.Print();
+    data.PrintOverview();
+    data.PrintData();
 }
diff --git a/src/onerule/main.cpp b/src/onerule/main.cpp
index 4f24fae..ee0099d 100644
--- a/src/onerule/main.cpp
+++ b/src/onerule/main.cpp
@@ -9,5 +9,5 @@ int main(int argc, char* argv[]) {
     ARFF::ParseArguments(argc, argv);
     ARFF::Arff data;
     data.Read(ARFF::GetDataFilename());
-    data.Print();
+    data.PrintOverview();
 }