Split print function into three pieces
This commit is contained in:
parent
42daff8a4c
commit
c49d160bd5
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user