Now integrate() can return the full trajectory and plotted in the Python; improved readablity
This commit is contained in:
parent
a2219af116
commit
a624814a0c
5 changed files with 144 additions and 106 deletions
14
loadtxt.h
Normal file
14
loadtxt.h
Normal 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;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue