Now integrate() can return the full trajectory and plotted in the Python; improved readablity

This commit is contained in:
Yohai Meiron 2020-04-12 21:37:03 -04:00
parent a2219af116
commit a624814a0c
5 changed files with 144 additions and 106 deletions

14
loadtxt.h Normal file
View file

@ -0,0 +1,14 @@
#pragma once
#include <string>
#include <vector>
class Loadtxt {
public:
Loadtxt(std::string file_name, std::vector<int> cols);
~Loadtxt();
std::vector<std::vector<double>> get_cols();
private:
const char *whitespaces = " \t";
void line_to_buf(std::vector<int> cols, std::string line, double *buffer);
double *buffer;
int n_rows, n_cols;
};