Stan  1.0
probability, sampling & optimization
Classes | Functions
stan::io Namespace Reference

Input/output utilities. More...

Classes

class  cmd_line
 Parses and stores command-line arguments. More...
 
class  csv_writer
 Writes Stan variables in comma-separated-value format to an output stream. More...
 
class  dump_writer
 Writes data into the S-plus dump format. More...
 
class  dump_reader
 Reads data from S-plus dump format. More...
 
class  dump
 Represents named arrays with dimensions. More...
 
class  reader
 A stream-based reader for integer, scalar, vector, matrix and array data types, with Jacobian calculations. More...
 
class  var_context
 A var_reader reads array variables of integer and floating point type by name and dimension. More...
 
class  writer
 A stream-based writer for integer, scalar, vector, matrix and array data types, which transforms from constrained to a sequence of constrained variables. More...
 

Functions

void pad_help_option (std::ostream *o, const std::string &option="", unsigned int width=20)
 Print help option with padding. More...
 
void print_help_helper (std::ostream *o, const std::string &key_val, const std::string &msg, const std::string &note="")
 Prints single print option to output ptr if non-null. More...
 
void print_help_option (std::ostream *o, const std::string &key, const std::string &value_type, const std::string &msg, const std::string &note="")
 Prints single print option to output ptr if non-null. More...
 
std::string utc_time_string ()
 Return the current coordinated universal time (UTC) as a string. More...
 

Detailed Description

Input/output utilities.

Function Documentation

◆ pad_help_option()

void stan::io::pad_help_option ( std::ostream *  o,
const std::string &  option = "",
unsigned int  width = 20 
)

Print help option with padding.

Print 2 spaces, the specified help option, then pad to the specified width with spaces. If there is not room for at least 2 padding spaces, start a new line and pad out to width.

Parameters
optionOption to print (default to empty string).
widthWidth of option (defaults to 20).
oOutput stream ptr, default to null

Definition at line 27 of file cmd_line.hpp.

◆ print_help_helper()

void stan::io::print_help_helper ( std::ostream *  o,
const std::string &  key_val,
const std::string &  msg,
const std::string &  note = "" 
)

Prints single print option to output ptr if non-null.

Parameters
key_val
msg
note

Definition at line 48 of file cmd_line.hpp.

◆ print_help_option()

void stan::io::print_help_option ( std::ostream *  o,
const std::string &  key,
const std::string &  value_type,
const std::string &  msg,
const std::string &  note = "" 
)

Prints single print option to output ptr if non-null.

Parameters
key
value_type
msg
note

Definition at line 72 of file cmd_line.hpp.

◆ utc_time_string()

std::string stan::io::utc_time_string ( )

Return the current coordinated universal time (UTC) as a string.

Output is of the form "Fri Feb 24 21:15:36 2012"

Returns
String representation of current UTC.

Definition at line 18 of file util.hpp.


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