36 #include "SimpleDataWriter.hpp"
37 #include "OutputFileHandler.hpp"
41 const std::string& rFileName,
42 const std::vector<std::vector<double> >& rData,
45 if (rData.size() == 0)
50 for (
unsigned i=0; i<rData.size(); i++)
52 if (rData[i].size() != rData[0].size())
54 EXCEPTION(
"Data vector sizes are not all equal");
61 for (
unsigned j=0; j<rData[0].size(); j++)
63 for (
unsigned i=0; i<rData.size(); i++)
65 (*p_file) << rData[i][j] <<
"\t";
73 const std::string& rFileName,
74 const std::vector<double>& rT,
75 const std::vector<double>& rX,
78 std::vector<std::vector<double> > data;
85 const std::string& rFileName,
86 const std::vector<double>& rData,
89 std::vector<std::vector<double> > data;
90 data.push_back(rData);
#define EXCEPTION(message)
out_stream OpenOutputFile(const std::string &rFileName, std::ios_base::openmode mode=std::ios::out|std::ios::trunc) const
SimpleDataWriter(const std::string &rDirectory, const std::string &rFileName, const std::vector< double > &rData, bool cleanDirectory=true)
SimpleDataWriter(const std::string &rDirectory, const std::string &rFileName, const std::vector< std::vector< double > > &rData, bool cleanDirectory=true)