#include "read_eigen_from_CSV.h" #include #include #include #include #include template IGL_INLINE bool igl::read_eigen_from_CSV(const std::string str, Eigen::Matrix& M) { using namespace std; using namespace igl; std::vector > Mt; std::ifstream infile(str.c_str()); std::string line; while (std::getline(infile, line)) { std::istringstream iss(line); vector temp; Scalar a; while (iss >> a) temp.push_back(a); if (temp.size() != 0) // skip empty lines Mt.push_back(temp); } if (Mt.size() != 0) { // Verify that it is indeed a matrix for (unsigned i = 0; i