/*-------------------------------------------------
Read .txt file
-------------------------------------------------*/
void ReadTxt(std::string fileStr)
{
std::ifstream file(fileStr);
std::string s;
while (getline(file,s))
{
std::vector<double> vec;
int start = 0, end = 0;
while(end!=s.size())
{
if (s[end]==' ')
{
string str;
str = s.substr(start, end-start);
double v = std::stod(str);
vec.push_back(v);
start = end+1;
}
end++;
}
}
}