| 405 | } |
| 406 | |
| 407 | inline bool readReferenceFile(const std::string& fileName, std::vector<std::string>& refVector) |
| 408 | { |
| 409 | std::ifstream infile(fileName); |
| 410 | if (!infile.is_open()) |
| 411 | { |
| 412 | std::cout << "ERROR: readReferenceFile: Attempting to read from a file that is not open." << std::endl; |
| 413 | return false; |
| 414 | } |
| 415 | std::string line; |
| 416 | while (std::getline(infile, line)) |
| 417 | { |
| 418 | if (line.empty()) |
| 419 | continue; |
| 420 | refVector.push_back(line); |
| 421 | } |
| 422 | infile.close(); |
| 423 | return true; |
| 424 | } |
| 425 | |
| 426 | template <typename T> |
| 427 | std::vector<std::string> classify( |