-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWriteTSV.hpp
More file actions
34 lines (29 loc) · 1.27 KB
/
WriteTSV.hpp
File metadata and controls
34 lines (29 loc) · 1.27 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
34
#ifndef WriteTSV_hpp
#define WriteTSV_hpp
#include "Eigen/Dense"
#include <fstream>
#include <string>
#include <vector>
class WriteTSV{
public:
WriteTSV(void);
WriteTSV(std::string filepath, bool overwrite);
~WriteTSV(void);
void addColumnNamesTSV(std::vector<std::string> cn);
void addRownamesTSV(std::vector<std::string> rn);
void addFilepath(std::string fp, bool overwrite);
void appendDataTSV(Eigen::MatrixXd x);
void appendDataTSV(std::vector<double> data);
void appendDataTSV(std::vector<std::string> data);
void appendDataTSV(std::string data);
void closeTSV(void);
void setRNFlag(bool b) { rnFlag = b;}
private:
std::fstream fout;
int numCols;
int numRows;
std::string filepath;
std::vector<std::string> rownames;
bool rnFlag;
};
#endif