-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReadTSV.hpp
More file actions
33 lines (29 loc) · 1.41 KB
/
ReadTSV.hpp
File metadata and controls
33 lines (29 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef ReadTSV_hpp
#define ReadTSV_hpp
#include <string>
#include <vector>
namespace Eigen {
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
class Matrix;
using MatrixXd = Matrix<double, -1, -1, 0, -1, -1>;
}
class ReadTSV{
public:
ReadTSV(std::string filepath, bool rownames, bool colnames);
ReadTSV(std::string filepath, bool rownames, bool colnames, bool string);
std::vector<std::string> getColnames(void){return colnames;}
Eigen::MatrixXd getEigenMat(void);
std::vector<std::vector<double>> getReadData(void){return doubleData;}
std::vector<std::vector<std::string>> getReadStringData(void){return stringData;}
std::vector<std::string> getRownames(void){return rownames;}
void print(void);
private:
std::vector<std::vector<double>> doubleData;
std::vector<std::string> colnames;
std::vector<std::string> rownames;
bool hasColnames;
bool hasRownames;
bool readingString;
std::vector<std::vector<std::string>> stringData;
};
#endif