26 #include <boost/regex.hpp>
31 #include "boost/lexical_cast.hpp"
39 using boost::regex_match;
59 while (line.empty() && sfile.
good()) {
64 boost::smatch s_match;
65 if (boost::regex_match(line, s_match, expression)) {
66 dataset_name = s_match[1].str();
88 auto table =
Table::AsciiReader{sfile}.fixColumnTypes({
typeid(double),
typeid(
double)}).read();
91 for (
auto row : table) {
101 bool is_a_dataset_file =
false;
108 boost::regex expression(
"\\s*#.*");
109 boost::smatch s_match;
110 while ((line.empty() || boost::regex_match(line, s_match, expression)) && sfile.
good()) {
119 ss >> d1 >> d2 >> empty_string;
120 boost::lexical_cast<double>(d1);
121 boost::lexical_cast<double>(d2);
122 if (!empty_string.empty()){
123 is_a_dataset_file =
false;
126 is_a_dataset_file =
true;
130 is_a_dataset_file =
false;
134 return is_a_dataset_file;