diff --git a/ArffFiles.hpp b/ArffFiles.hpp index 9bc0c4d..2f5eedd 100644 --- a/ArffFiles.hpp +++ b/ArffFiles.hpp @@ -126,11 +126,11 @@ public: } return summarizeFile(fileName, className); } - std::vector getLines() const { return lines; } - unsigned long int getSize() const { return lines.size(); } + const std::vector& getLines() const { return lines; } + size_t getSize() const { return lines.size(); } std::string getClassName() const { return className; } std::string getClassType() const { return classType; } - std::map> getStates() const { return states; } + const std::map>& getStates() const { return states; } std::vector getLabels() const { return states.at(className); } static std::string trim(const std::string& source) { @@ -143,8 +143,8 @@ public: const std::vector>& getX() const { return X; } std::vector& getY() { return y; } const std::vector& getY() const { return y; } - std::map getNumericAttributes() const { return numeric_features; } - std::vector> getAttributes() const { return attributes; }; + const std::map& getNumericAttributes() const { return numeric_features; } + const std::vector>& getAttributes() const { return attributes; }; std::vector split(const std::string& text, char delimiter) { std::vector result;