hops
CsvWriter.hpp
Go to the documentation of this file.
1 #ifndef HOPS_CSVWRITER_HPP
2 #define HOPS_CSVWRITER_HPP
3 
4 #include "FileWriter.hpp"
5 
6 namespace hops {
7  class CsvWriter : public FileWriter {
8  public:
9  explicit CsvWriter(std::string path, int outputPrecision = 17);
10 
11  void write(const std::string &description, const std::vector<float> &records) const override;
12 
13  void write(const std::string &description, const std::vector<double> &records) const override;
14 
15  void write(const std::string &description, const std::vector<long> &records) const override;
16 
17  void write(const std::string &description, const std::vector<Eigen::VectorXf> &records) const override;
18 
19  void write(const std::string &description, const std::vector<Eigen::VectorXd> &records) const override;
20 
21  void write(const std::string &description, const std::vector<std::string> &records) const override;
22 
23  void write(const std::string &description, const Eigen::MatrixXd &matrix) const override;
24 
25  void write(const std::string &description, const Eigen::VectorXd &vector) const override;
26 
27  private:
28  std::string path;
29  int outputPrecision;
30  };
31 }
32 
33 #endif //HOPS_CSVWRITER_HPP
hops::CsvWriter
Definition: CsvWriter.hpp:7
hops::CsvWriter::CsvWriter
CsvWriter(std::string path, int outputPrecision=17)
Definition: CsvWriter.cpp:25
hops::FileWriter
Definition: FileWriter.hpp:9
hops::CsvWriter::write
void write(const std::string &description, const std::vector< float > &records) const override
Writes records.
Definition: CsvWriter.cpp:30
hops
Definition: CsvReader.hpp:8
string
NAME string(REPLACE ".cpp" "_bin" example_name ${example_filename}) if($
Definition: hops/Third-party/HighFive/src/examples/CMakeLists.txt:6
FileWriter.hpp