Writes data into the S-plus dump format.
More...
#include <dump.hpp>
|
| | dump_writer () |
| | Construct a dump writer writing to standard output. More...
|
| |
| | dump_writer (std::ostream &out) |
| | Construct a dump writer writing to the specified output stream. More...
|
| |
| | ~dump_writer () |
| | Destroy this writer. More...
|
| |
| template<typename T > |
| void | write (const std::string &name, const T &x) |
| | Write a variable with the specified name and value. More...
|
| |
| template<typename T > |
| void | dump_structure (std::string, std::vector< size_t > dims, std::vector< T > xs) |
| | Write a structure variable with the specified name, dimensions, and integer or double values. More...
|
| |
| template<typename T > |
| void | dump_list (std::string name, std::vector< T > xs) |
| | Write a list variable with the specified name and integer or double values. More...
|
| |
| template<typename T > |
| void | dump_var (std::string name, T x) |
| | Write a list variable with the specified name and integer or double values. More...
|
| |
Writes data into the S-plus dump format.
A dump_writer writes data into the S-plus dump format, a human-readable ASCII representation of arbitrarily dimensioned arrays of integers and arrays of floating point values.
Definition at line 42 of file dump.hpp.
| stan::io::dump_writer::dump_writer |
( |
| ) |
|
|
inline |
Construct a dump writer writing to standard output.
Definition at line 272 of file dump.hpp.
| stan::io::dump_writer::dump_writer |
( |
std::ostream & |
out | ) |
|
|
inline |
Construct a dump writer writing to the specified output stream.
- Parameters
-
| out | Output stream for writing. |
Definition at line 280 of file dump.hpp.
| stan::io::dump_writer::~dump_writer |
( |
| ) |
|
|
inline |
Destroy this writer.
Definition at line 285 of file dump.hpp.
template<typename T >
| void stan::io::dump_writer::dump_list |
( |
std::string |
name, |
|
|
std::vector< T > |
xs |
|
) |
| |
|
inline |
Write a list variable with the specified name and integer or double values.
- Parameters
-
| name | Name of variable. |
| xs | Values of variable. |
- Template Parameters
-
Definition at line 340 of file dump.hpp.
template<typename T >
| void stan::io::dump_writer::dump_structure |
( |
std::string |
, |
|
|
std::vector< size_t > |
dims, |
|
|
std::vector< T > |
xs |
|
) |
| |
|
inline |
Write a structure variable with the specified name, dimensions, and integer or double values.
name Name of variable.
- Parameters
-
| dims | Dimensions of variable. |
| xs | Values of variable in last-index major format. |
- Template Parameters
-
Definition at line 322 of file dump.hpp.
template<typename T >
| void stan::io::dump_writer::dump_var |
( |
std::string |
name, |
|
|
T |
x |
|
) |
| |
|
inline |
Write a list variable with the specified name and integer or double values.
- Parameters
-
| name | Name of variable. |
| x | Value of variable. |
- Template Parameters
-
Definition at line 355 of file dump.hpp.
template<typename T >
| void stan::io::dump_writer::write |
( |
const std::string & |
name, |
|
|
const T & |
x |
|
) |
| |
|
inline |
Write a variable with the specified name and value.
This method will work for basic types consisting of doubles and integers, Eigen types for vectors, row vectors and matrices. If this method works for a type, it will work for a standard vector of that type.
Information concerning final type organization into Eigen vectors, row vectors and matrices is lost.
All data is written in final-index dominant ordering.
- Parameters
-
| name | Name of variable to write. |
| x | Value of variable. |
- Template Parameters
-
| Type | of variable being written. |
Definition at line 306 of file dump.hpp.
The documentation for this class was generated from the following file: