CSV export + DFT math operation

This commit is contained in:
Jan Käberich 2020-12-11 20:28:40 +01:00
parent 79a990af47
commit 6e55eb02dd
27 changed files with 935 additions and 52 deletions

View file

@ -0,0 +1,30 @@
#ifndef CSV_H
#define CSV_H
#include <QString>
#include <vector>
class CSV
{
public:
CSV();
static CSV fromFile(QString filename, char sep = ',');
void toFile(QString filename, char sep = ',');
std::vector<double> getColumn(QString header);
std::vector<double> getColumn(unsigned int index);
unsigned int columns() { return _columns.size();}
void addColumn(QString name, const std::vector<double> &data);
private:
class Column {
public:
QString header;
std::vector<double> data;
};
std::vector<Column> _columns;
};
#endif // CSV_H