Stan  2.10.0
probability, sampling & optimization
Public Member Functions | List of all members
stan::interface_callbacks::writer::stream_writer Class Reference

stream_writer writes to an std::ostream. More...

#include <stream_writer.hpp>

Inheritance diagram for stan::interface_callbacks::writer::stream_writer:
stan::interface_callbacks::writer::base_writer

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...
 
- Public Member Functions inherited from stan::interface_callbacks::writer::base_writer
virtual ~base_writer ()
 Destructor. More...
 

Detailed Description

stream_writer writes to an std::ostream.

Definition at line 16 of file stream_writer.hpp.

Constructor & Destructor Documentation

stan::interface_callbacks::writer::stream_writer::stream_writer ( std::ostream &  output,
const std::string &  key_value_prefix = "" 
)
inline

Constructor.

Parameters
outputstd::ostream to write to
key_value_prefixString to write before lines treated as comments.

Definition at line 25 of file stream_writer.hpp.

Member Function Documentation

void stan::interface_callbacks::writer::stream_writer::operator() ( const std::string &  key,
double  value 
)
inlinevirtual

Writes a key, value pair.

Parameters
[in]keyA string
[in]valueA double value

Implements stan::interface_callbacks::writer::base_writer.

Definition at line 29 of file stream_writer.hpp.

void stan::interface_callbacks::writer::stream_writer::operator() ( const std::string &  key,
int  value 
)
inlinevirtual

Writes a key, value pair.

Parameters
[in]keyA string
[in]valueAn integer value

Implements stan::interface_callbacks::writer::base_writer.

Definition at line 33 of file stream_writer.hpp.

void stan::interface_callbacks::writer::stream_writer::operator() ( const std::string &  key,
const std::string &  value 
)
inlinevirtual

Writes a key, value pair.

Parameters
[in]keyA string
[in]valueA string

Implements stan::interface_callbacks::writer::base_writer.

Definition at line 37 of file stream_writer.hpp.

void stan::interface_callbacks::writer::stream_writer::operator() ( const std::string &  key,
const double *  values,
int  n_values 
)
inlinevirtual

Writes a key, value pair.

Parameters
[in]keyA string
[in]valuesA double array, typically used with contiguous Eigen vectors
[in]n_valuesLength of the array

Implements stan::interface_callbacks::writer::base_writer.

Definition at line 41 of file stream_writer.hpp.

void stan::interface_callbacks::writer::stream_writer::operator() ( const std::string &  key,
const double *  values,
int  n_rows,
int  n_cols 
)
inlinevirtual

Writes a key, value pair.

Parameters
[in]keyA string
[in]valuesA double array assumed to represent a 2d matrix stored in column major order, typically used with contiguous Eigen matrices
[in]n_rowsRows
[in]n_colsColumns

Implements stan::interface_callbacks::writer::base_writer.

Definition at line 54 of file stream_writer.hpp.

void stan::interface_callbacks::writer::stream_writer::operator() ( const std::vector< std::string > &  names)
inlinevirtual

Writes a set of names.

Parameters
[in]namesNames in a std::vector

Implements stan::interface_callbacks::writer::base_writer.

Definition at line 69 of file stream_writer.hpp.

void stan::interface_callbacks::writer::stream_writer::operator() ( const std::vector< double > &  state)
inlinevirtual

Writes a set of values.

Parameters
[in]stateValues in a std::vector

Implements stan::interface_callbacks::writer::base_writer.

Definition at line 81 of file stream_writer.hpp.

void stan::interface_callbacks::writer::stream_writer::operator() ( )
inlinevirtual

Writes blank input.

Implements stan::interface_callbacks::writer::base_writer.

Definition at line 93 of file stream_writer.hpp.

void stan::interface_callbacks::writer::stream_writer::operator() ( const std::string &  message)
inlinevirtual

Writes a string.

Parameters
[in]messageA string

Implements stan::interface_callbacks::writer::base_writer.

Definition at line 97 of file stream_writer.hpp.


The documentation for this class was generated from the following file:

     [ Stan Home Page ] © 2011–2016, Stan Development Team.