SimpleDataWriter Class Reference

#include <SimpleDataWriter.hpp>

List of all members.

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)

Detailed Description

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 42 of file SimpleDataWriter.hpp.


Constructor & Destructor Documentation

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

Parameters:
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 33 of file SimpleDataWriter.cpp.

References EXCEPTION, and OutputFileHandler::OpenOutputFile().

Referenced by SimpleDataWriter().

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

Parameters:
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 65 of file SimpleDataWriter.cpp.

References SimpleDataWriter().

Referenced by SimpleDataWriter().

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

Parameters:
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 77 of file SimpleDataWriter.cpp.

References SimpleDataWriter().


The documentation for this class was generated from the following files:
Generated on Thu Dec 22 13:07:33 2011 for Chaste by  doxygen 1.6.3