Function vector_out_quotes (o2scl)¶
-
template<class vec_t>
void o2scl::vector_out_quotes(std::ostream &os, size_t n, const vec_t &v, bool endline = false)¶ Output a vector to a stream with quotes and commas.
No trailing space is output after the last element, and an endline is output only if
endlineis set totrue. If the parameternis zero, this function silently does nothing.This works with any class
vec_twhich has an operator[] which returns either the value of or a reference to the ith element and the element type has its own output operator which has been defined.
-
template<class vec_t>
void o2scl::vector_out_quotes(std::ostream &os, const vec_t &v, bool endline = false)¶ Output a vector to a stream with quotes and commas.
No trailing space is output after the last element, and an endline is output only if
endlineis set totrue. If the parameternis zero, this function silently does nothing.This works with any class
vec_twhich has an operator[] which returns either the value of or a reference to the ith element and the element type has its own output operator which has been defined.