6 #include <gsl/gsl_math.h> 19 inline static auto get_range(
double xmin,
double xmax,
double dx) {
20 std::vector<double> v;
33 std::ofstream fout{ fname };
36 throw std::ios_base::failure{ fname };
46 auto split(
const std::string &s,
char delim) {
47 std::vector<std::string> tokens;
48 std::stringstream sstream{ s };
50 while (std::getline(sstream, token, delim)) {
51 tokens.push_back(token);
61 auto split(
const std::string &s,
const std::string &delim) {
63 std::vector<std::string> tokens;
64 while ((beg = s.find_first_not_of(delim, pos)) != std::string::npos) {
65 pos = s.find_first_of(delim, beg + 1);
66 tokens.push_back(s.substr(beg, pos - beg));