![]() |
Stan
2.10.0
probability, sampling & optimization
|
stream_writer writes to an std::ostream. More...
#include <stream_writer.hpp>
Public Member Functions | |
stream_writer (std::ostream &output, const std::string &key_value_prefix="") | |
Constructor. More... | |
void | operator() (const std::string &key, double value) |
Writes a key, value pair. More... | |
void | operator() (const std::string &key, int value) |
Writes a key, value pair. More... | |
void | operator() (const std::string &key, const std::string &value) |
Writes a key, value pair. More... | |
void | operator() (const std::string &key, const double *values, int n_values) |
Writes a key, value pair. More... | |
void | operator() (const std::string &key, const double *values, int n_rows, int n_cols) |
Writes a key, value pair. More... | |
void | operator() (const std::vector< std::string > &names) |
Writes a set of names. More... | |
void | operator() (const std::vector< double > &state) |
Writes a set of values. More... | |
void | operator() () |
Writes blank input. More... | |
void | operator() (const std::string &message) |
Writes a string. More... | |
![]() | |
virtual | ~base_writer () |
Destructor. More... | |
stream_writer writes to an std::ostream.
Definition at line 16 of file stream_writer.hpp.
|
inline |
Constructor.
output | std::ostream to write to |
key_value_prefix | String to write before lines treated as comments. |
Definition at line 25 of file stream_writer.hpp.
|
inlinevirtual |
Writes a key, value pair.
[in] | key | A string |
[in] | value | A double value |
Implements stan::interface_callbacks::writer::base_writer.
Definition at line 29 of file stream_writer.hpp.
|
inlinevirtual |
Writes a key, value pair.
[in] | key | A string |
[in] | value | An integer value |
Implements stan::interface_callbacks::writer::base_writer.
Definition at line 33 of file stream_writer.hpp.
|
inlinevirtual |
Writes a key, value pair.
[in] | key | A string |
[in] | value | A string |
Implements stan::interface_callbacks::writer::base_writer.
Definition at line 37 of file stream_writer.hpp.
|
inlinevirtual |
Writes a key, value pair.
[in] | key | A string |
[in] | values | A double array, typically used with contiguous Eigen vectors |
[in] | n_values | Length of the array |
Implements stan::interface_callbacks::writer::base_writer.
Definition at line 41 of file stream_writer.hpp.
|
inlinevirtual |
Writes a key, value pair.
[in] | key | A string |
[in] | values | A double array assumed to represent a 2d matrix stored in column major order, typically used with contiguous Eigen matrices |
[in] | n_rows | Rows |
[in] | n_cols | Columns |
Implements stan::interface_callbacks::writer::base_writer.
Definition at line 54 of file stream_writer.hpp.
|
inlinevirtual |
Writes a set of names.
[in] | names | Names in a std::vector |
Implements stan::interface_callbacks::writer::base_writer.
Definition at line 69 of file stream_writer.hpp.
|
inlinevirtual |
Writes a set of values.
[in] | state | Values in a std::vector |
Implements stan::interface_callbacks::writer::base_writer.
Definition at line 81 of file stream_writer.hpp.
|
inlinevirtual |
Writes blank input.
Implements stan::interface_callbacks::writer::base_writer.
Definition at line 93 of file stream_writer.hpp.
|
inlinevirtual |
Writes a string.
[in] | message | A string |
Implements stan::interface_callbacks::writer::base_writer.
Definition at line 97 of file stream_writer.hpp.