1 #ifndef STAN__COMMON__RECORDER__CSV_HPP
2 #define STAN__COMMON__RECORDER__CSV_HPP
22 const bool has_stream_;
23 const std::string prefix_;
31 csv(std::ostream *o, std::string prefix)
32 : o_(o), has_stream_(o != 0), prefix_(prefix) { }
52 for (idx_t n = 1; n < x.size(); n++) {
71 *o_ << prefix_ << x << std::endl;
void operator()(const std::string x)
Print single string with a prefix.
void operator()(const std::vector< T > &x)
Print vector as csv.
Writes out a vector as string.
bool is_recording() const
Indicator function for whether the instance is recording.
Primary template class for the metaprogram to compute the index type of a container.
csv(std::ostream *o, std::string prefix)
Construct an object.
void operator()()
Prints a blank line.