Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
|
#include <SimpleDataWriter.hpp>
Public Member Functions | |
SimpleDataWriter (const std::string &rDirectory, const std::string &rFileName, const std::vector< std::vector< double > > &rData, bool cleanDirectory=true) | |
SimpleDataWriter (const std::string &rDirectory, const std::string &rFileName, const std::vector< double > &rT, const std::vector< double > &rX, bool cleanDirectory=true) | |
SimpleDataWriter (const std::string &rDirectory, const std::string &rFileName, const std::vector< double > &rData, bool cleanDirectory=true) | |
A basic data writer that is easier to use than ColumnDataWriter but has less functionality. NOTE: this is not an efficient writer.
This class does not writer header lines so is ideal for immediately reading with MATLAB or Gnuplot.
Definition at line 49 of file SimpleDataWriter.hpp.
SimpleDataWriter::SimpleDataWriter | ( | const std::string & | rDirectory, |
const std::string & | rFileName, | ||
const std::vector< std::vector< double > > & | rData, | ||
bool | cleanDirectory = true |
||
) |
Write the provided data out to the given file in columns
rDirectory | The directory, relative to TEST_OUTPUT |
rFileName | The full file name (no format will be apended) |
rData | The data. data[0] will written as the first column, data[1] the second, and so on. An exception is thrown if they are not the same size |
cleanDirectory | Whether to clean the directory (defaults to true) |
Definition at line 40 of file SimpleDataWriter.cpp.
References EXCEPTION, and OutputFileHandler::OpenOutputFile().
SimpleDataWriter::SimpleDataWriter | ( | const std::string & | rDirectory, |
const std::string & | rFileName, | ||
const std::vector< double > & | rT, | ||
const std::vector< double > & | rX, | ||
bool | cleanDirectory = true |
||
) |
Write the provided data out to the given file in 2 columns
rDirectory | The directory, relative to TEST_OUTPUT |
rFileName | The full file name (no format will be apended) |
rT | The first column of data |
rX | The second column of data. An exception is thrown if the size of x is not the same as the size of t. |
cleanDirectory | Whether to clean the directory (defaults to true) |
Definition at line 72 of file SimpleDataWriter.cpp.
SimpleDataWriter::SimpleDataWriter | ( | const std::string & | rDirectory, |
const std::string & | rFileName, | ||
const std::vector< double > & | rData, | ||
bool | cleanDirectory = true |
||
) |
Write the provided data out to the given file in one column
rDirectory | The directory, relative to TEST_OUTPUT |
rFileName | The full file name (no format will be apended) |
rData | A std::vec of data |
cleanDirectory | Whether to clean the directory (defaults to true) |
Definition at line 84 of file SimpleDataWriter.cpp.
References SimpleDataWriter().
Referenced by SimpleDataWriter().