Templates for turning vectors (1D-matrices) into strings
| 332 | }; |
| 333 | ///Templates for turning vectors (1D-matrices) into strings |
| 334 | inline std::string stringvec_to_string(const std::vector<std::string>& a) { |
| 335 | if (a.size() < 1) return {""}; |
| 336 | std::stringstream out; |
| 337 | out << "[ " << format("%s", a[0].c_str()); |
| 338 | for (size_t j = 1; j < a.size(); j++) { |
| 339 | out << ", " << format("%s", a[j].c_str()); |
| 340 | } |
| 341 | out << " ]"; |
| 342 | return out.str(); |
| 343 | }; |
| 344 | |
| 345 | /// Templates for turning numbers (0D-matrices) into strings |
| 346 | template <class T> |